home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr50 / secur11.zip / SECURITY.TXT < prev   
Text File  |  1994-11-13  |  165KB  |  4,341 lines

  1.  
  2.                     IMPROVING THE SECURITY OF YOUR
  3.             UNIX SYSTEM
  4.  
  5.  
  6.                     David A. Curry, Systems Programmer
  7.                     Information and Telecommunications Sciences and
  8.             Technology Division
  9.  
  10.                     ITSTD-721-FR-90-21
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                     Approved:
  32.  
  33.                     Paul K. Hyder, Manager
  34.                     Computer Facility
  35.  
  36.                     Boyd C. Fair, General Manager
  37.                     Division Operations Section
  38.  
  39.                     Michael S. Frankel, Vice President
  40.                     Information and Telecommunications Sciences and
  41.             Technology Division
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.           SRI International  333 Ravenswood Avenue +o Menlo Park, CA 94025 +o
  52.                (415) 326-6200 +o FAX: (415) 326-5512 +o Telex: 334486
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                       CONTENTS
  64.  
  65.  
  66.  
  67.           1       INTRODUCTION...........................................  1
  68.           1.1     UNIX Security..........................................  1
  69.           1.2     The Internet Worm......................................  2
  70.           1.3     Spies and Espionage....................................  3
  71.           1.4     Other Break-Ins........................................  4
  72.           1.5     Security is Important..................................  4
  73.  
  74.           2       IMPROVING SECURITY.....................................  5
  75.           2.1     Account Security.......................................  5
  76.           2.1.1   Passwords..............................................  5
  77.           2.1.1.1 Selecting Passwords....................................  6
  78.           2.1.1.2 Password Policies......................................  8
  79.           2.1.1.3 Checking Password Security.............................  8
  80.           2.1.2   Expiration Dates.......................................  9
  81.           2.1.3   Guest Accounts......................................... 10
  82.           2.1.4   Accounts Without Passwords............................. 10
  83.           2.1.5   Group Accounts and Groups.............................. 10
  84.           2.1.6   Yellow Pages........................................... 11
  85.           2.2     Network Security....................................... 12
  86.           2.2.1   Trusted Hosts.......................................... 13
  87.           2.2.1.1 The hosts.equiv File................................... 13
  88.           2.2.1.2 The .rhosts File....................................... 14
  89.           2.2.2   Secure Terminals....................................... 15
  90.           2.2.3   The Network File System................................ 16
  91.           2.2.3.1 The exports File....................................... 16
  92.           2.2.3.2 The netgroup File...................................... 17
  93.           2.2.3.3 Restricting Super-User Access.......................... 18
  94.           2.2.4   FTP.................................................... 19
  95.           2.2.4.1 Trivial FTP............................................ 20
  96.           2.2.5   Mail................................................... 21
  97.           2.2.6   Finger................................................. 22
  98.           2.2.7   Modems and Terminal Servers............................ 23
  99.           2.2.8   Firewalls.............................................. 23
  100.           2.3     File System Security................................... 24
  101.           2.3.1   Setuid Shell Scripts................................... 25
  102.           2.3.2   The Sticky Bit on Directories.......................... 26
  103.           2.3.3   The Setgid Bit on Directories.......................... 26
  104.           2.3.4   The umask Value........................................ 27
  105.           2.3.5   Encrypting Files....................................... 27
  106.           2.3.6   Devices................................................ 28
  107.           2.4     Security Is Your Responsibility........................ 29
  108.  
  109.           3       MONITORING SECURITY.................................... 31
  110.           3.1     Account Security....................................... 31
  111.           3.1.1   The lastlog File....................................... 31
  112.           3.1.2   The utmp and wtmp Files................................ 31
  113.           3.1.3   The acct File.......................................... 33
  114.           3.2     Network Security....................................... 34
  115.  
  116.  
  117.  
  118.                                          iii
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                 CONTENTS (concluded)
  131.  
  132.  
  133.  
  134.           3.2.1   The syslog Facility.................................... 34
  135.           3.2.2   The showmount Command.................................. 35
  136.           3.3     File System Security................................... 35
  137.           3.3.1   The find Command....................................... 36
  138.           3.3.1.1 Finding Setuid and Setgid Files........................ 36
  139.           3.3.1.2 Finding World-Writable Files........................... 38
  140.           3.3.1.3 Finding Unowned Files.................................. 38
  141.           3.3.1.4 Finding .rhosts Files.................................. 39
  142.           3.3.2   Checklists............................................. 39
  143.           3.3.3   Backups................................................ 40
  144.           3.4     Know Your System....................................... 41
  145.           3.4.1   The ps Command......................................... 41
  146.           3.4.2   The who and w Commands................................. 42
  147.           3.4.3   The ls Command......................................... 42
  148.           3.5     Keep Your Eyes Open.................................... 42
  149.  
  150.           4       SOFTWARE FOR IMPROVING SECURITY........................ 45
  151.           4.1     Obtaining Fixes and New Versions....................... 45
  152.           4.1.1   Sun Fixes on UUNET..................................... 45
  153.           4.1.2   Berkeley Fixes......................................... 46
  154.           4.1.3   Simtel-20 and UUNET.................................... 47
  155.           4.1.4   Vendors................................................ 47
  156.           4.2     The npasswd Command.................................... 48
  157.           4.3     The COPS Package....................................... 48
  158.           4.4     Sun C2 Security Features............................... 49
  159.           4.5     Kerberos............................................... 50
  160.  
  161.           5       KEEPING ABREAST OF THE BUGS............................ 51
  162.           5.1     The Computer Emergency Response Team................... 51
  163.           5.2     DDN Management Bulletins............................... 51
  164.           5.3     Security-Related Mailing Lists......................... 52
  165.           5.3.1   Security............................................... 52
  166.           5.3.2   RISKS.................................................. 52
  167.           5.3.3   TCP-IP................................................. 53
  168.           5.3.4   SUN-SPOTS, SUN-NETS, SUN-MANAGERS...................... 53
  169.           5.3.5   VIRUS-L................................................ 53
  170.  
  171.           6       SUGGESTED READING...................................... 55
  172.  
  173.           7       CONCLUSIONS............................................ 57
  174.  
  175.           REFERENCES..................................................... 59
  176.  
  177.           APPENDIX A - SECURITY CHECKLIST................................ 63
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.                                          iv
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                        SECTION 1
  196.  
  197.                                      INTRODUCTION
  198.  
  199.  
  200.           1.1   UNIX SECURITY
  201.  
  202.  
  203.  
  204.                  The UNIX operating system, although now in widespread  use
  205.             in  environments  concerned  about  security,  was  not  really
  206.             designed with security in mind [Ritc75].  This  does  not  mean
  207.             that  UNIX  does  not  provide any security mechanisms; indeed,
  208.             several very good ones are available.  However, most  ``out  of
  209.             the  box''  installation  procedures from companies such as Sun
  210.             Microsystems still install the operating  system  in  much  the
  211.             same  way  as it was installed 15 years ago:  with little or no
  212.             security enabled.
  213.  
  214.                  The reasons for this state of affairs are largely histori-
  215.             cal.   UNIX  was  originally designed by programmers for use by
  216.             other programmers.  The environment in which it  was  used  was
  217.             one of open cooperation, not one of privacy.  Programmers typi-
  218.             cally collaborated with each other on projects, and hence  pre-
  219.             ferred  to be able to share their files with each other without
  220.             having to climb over security hurdles.  Because the first sites
  221.             outside  of  Bell  Laboratories to install UNIX were university
  222.             research laboratories, where a similar environment existed,  no
  223.             real need for greater security was seen until some time later.
  224.  
  225.                  In the early 1980s, many universities began to move  their
  226.             UNIX systems out of the research laboratories and into the com-
  227.             puter centers, allowing (or forcing) the user population  as  a
  228.             whole  to  use  this new and wonderful system.  Many businesses
  229.             and government sites began to install  UNIX  systems  as  well,
  230.             particularly  as  desktop workstations became more powerful and
  231.             affordable.  Thus, the UNIX operating system is no longer being
  232.             used only in environments where open collaboration is the goal.
  233.             Universities require their students to use the system for class
  234.             assignments,  yet  they  do not want the students to be able to
  235.             copy from each other.  Businesses use their  UNIX  systems  for
  236.             confidential  tasks  such  as bookkeeping and payroll.  And the
  237.             government uses UNIX systems for various unclassified yet  sen-
  238.             sitive purposes.
  239.  
  240.                  To complicate matters, new features  have  been  added  to
  241.             UNIX  over  the  years,  making security even more difficult to
  242.             control.  Perhaps  the  most  problematic  features  are  those
  243.           _________________________
  244.           UNIX is a registered trademark of AT&T.  VAX is  a  trademark  of
  245.           Digital  Equipment  Corporation.  Sun-3 and NFS are trademarks of
  246.           Sun Microsystems.  Annex is a trademark of Xylogics, Inc.
  247.  
  248.  
  249.  
  250.                                           1
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.             relating to networking:  remote login,  remote  command  execu-
  262.             tion,  network  file  systems, diskless workstations, and elec-
  263.             tronic mail.  All of these features have increased the  utility
  264.             and  usability  of UNIX by untold amounts.  However, these same
  265.             features, along with the widespread connection of UNIX  systems
  266.             to  the  Internet  and  other networks, have opened up many new
  267.             areas of vulnerability to unauthorized abuse of the system.
  268.  
  269.  
  270.           1.2   THE INTERNET WORM
  271.  
  272.  
  273.  
  274.                  On the evening of November  2,  1988,  a  self-replicating
  275.             program,  called  a _w_o_r_m, was released on the Internet [Seel88,
  276.             Spaf88, Eich89].  Overnight, this  program  had  copied  itself
  277.             from  machine  to  machine, causing the machines it infected to
  278.             labor under huge loads, and denying service  to  the  users  of
  279.             those  machines.   Although the program only infected two types
  280.             of computers,* it spread quickly, as did  the  concern,  confu-
  281.             sion,  and  sometimes  panic  of  system  administrators  whose
  282.             machines were affected.  While many system administrators  were
  283.             aware that something like this could theoretically happen - the
  284.             security holes exploited by the worm  were  well  known  -  the
  285.             scope  of the worm's break-ins came as a great surprise to most
  286.             people.
  287.  
  288.                  The worm itself did  not  destroy  any  files,  steal  any
  289.             information  (other  than account passwords), intercept private
  290.             mail, or plant other destructive software  [Seel88].   However,
  291.             it did manage to severely disrupt the operation of the network.
  292.             Several sites, including parts of  MIT,  NASA's  Ames  Research
  293.             Center  and  Goddard  Space  Flight  Center, the Jet Propulsion
  294.             Laboratory, and the U. S. Army Ballistic  Research  Laboratory,
  295.             disconnected themselves from the Internet to avoid recontamina-
  296.             tion.  In addition, the Defense Communications  Agency  ordered
  297.             the  connections  between the MILNET and ARPANET shut down, and
  298.             kept them down for nearly 24 hours  [Eich89,  Elme88].   Ironi-
  299.             cally,  this was perhaps the worst thing to do, since the first
  300.             fixes to combat the  worm  were  distributed  via  the  network
  301.             [Eich89].
  302.  
  303.                  This incident was perhaps the most widely  described  com-
  304.             puter  security  problem  ever.   The  worm was covered in many
  305.             newspapers and magazines around the country including  the  _N_e_w
  306.             _Y_o_r_k  _T_i_m_e_s,  _W_a_l_l  _S_t_r_e_e_t  _J_o_u_r_n_a_l,  _T_i_m_e  and  most computer-
  307.             oriented technical publications, as well as on all three  major
  308.           _________________________
  309.             * Sun-3 systems from Sun  Microsystems  and  VAX  systems  from
  310.           Digital  Equipment  Corp.,  both running variants of 4._x BSD UNIX
  311.           from the University of California at Berkeley.
  312.  
  313.  
  314.  
  315.  
  316.                                           2
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.             television networks, the Cable News Network, and National  Pub-
  328.             lic  Radio.   In  January  1990, a United States District Court
  329.             jury found Robert Tappan Morris, the author of the worm, guilty
  330.             of  charges  brought  against him under a 1986 federal computer
  331.             fraud and abuse law.  Morris faces up to five years  in  prison
  332.             and  a $250,000 fine [Schu90].  Sentencing is scheduled for May
  333.             4, 1990.
  334.  
  335.  
  336.           1.3   SPIES AND ESPIONAGE
  337.  
  338.  
  339.  
  340.                  In August  1986,  the  Lawrence  Berkeley  Laboratory,  an
  341.             unclassified  research laboratory at the University of Califor-
  342.             nia at Berkeley,  was  attacked  by  an  unauthorized  computer
  343.             intruder  [Stol88, Stol89].  Instead of immediately closing the
  344.             holes the intruder was using, the system  administrator,  Clif-
  345.             ford  Stoll,  elected  to  watch  the intruder and document the
  346.             weaknesses he  exploited.   Over  the  next  10  months,  Stoll
  347.             watched  the  intruder  attack  over  400  computers around the
  348.             world, and successfully enter about 30.  The  computers  broken
  349.             into  were located at universities, military bases, and defense
  350.             contractors [Stol88].
  351.  
  352.                  Unlike many intruders seen on the Internet, who  typically
  353.             enter  systems  and  browse  around  to see what they can, this
  354.             intruder was looking for something specific.   Files  and  data
  355.             dealing  with the Strategic Defense Initiative, the space shut-
  356.             tle, and other military topics all  seemed  to  be  of  special
  357.             interest.  Although it is unlikely that the intruder would have
  358.             found any truly classified  information  (the  Internet  is  an
  359.             unclassified  network),  it  was  highly probable that he could
  360.             find a wealth of sensitive material [Stol88].
  361.  
  362.                  After a year of tracking the intruder (eventually  involv-
  363.             ing  the FBI, CIA, National Security Agency, Air Force Intelli-
  364.             gence, and authorities in West Germany), five men in  Hannover,
  365.             West  Germany  were  arrested.   In  March  1989, the five were
  366.             charged with espionage:  they had  been  selling  the  material
  367.             they  found  during their exploits to the KGB.  One of the men,
  368.             Karl Koch (``Hagbard''), was later found burned to death in  an
  369.             isolated  forest  outside  Hannover.  No suicide note was found
  370.             [Stol89].  In February 1990, three  of  the  intruders  (Markus
  371.             Hess,  Dirk  Bresinsky,  and  Peter  Carl)  were  convicted  of
  372.             espionage in a German court  and  sentenced  to  prison  terms,
  373.             fines, and the loss of their rights to participate in elections
  374.             [Risk90].  The last of the intruders, Hans Hu"bner  (``Pengo''),
  375.             still faces trial in Berlin.
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.                                           3
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.           1.4   OTHER BREAK-INS
  394.  
  395.  
  396.  
  397.                  Numerous other computer security problems have occurred in
  398.             recent  years,  with  varying levels of publicity.  Some of the
  399.             more widely known incidents include break-ins  on  NASA's  SPAN
  400.             network [McLe87], the IBM ``Christmas Virus'' [Risk87], a virus
  401.             at Mitre Corp. that caused the MILNET to  be  temporarily  iso-
  402.             lated from other networks [Risk88], a worm that penetrated DEC-
  403.             NET networks [Risk89a], break-ins on  U.  S.  banking  networks
  404.             [Risk89b], and a multitude of viruses, worms, and trojan horses
  405.             affecting personal computer users.
  406.  
  407.  
  408.           1.5   SECURITY IS IMPORTANT
  409.  
  410.  
  411.  
  412.                  As the previous stories demonstrate, computer security  is
  413.             an  important  topic.   This  document  describes  the security
  414.             features provided by the UNIX operating system,  and  how  they
  415.             should  be  used.  The discussion centers around version 4._x of
  416.             SunOS, the version of UNIX sold by Sun Microsystems.   Most  of
  417.             the  information  presented  applies equally well to other UNIX
  418.             systems.  Although there is no way  to  make  a  computer  com-
  419.             pletely  secure against unauthorized use (other than to lock it
  420.             in a room and turn it off), by following  the  instructions  in
  421.             this  document  you  can  make  your  system impregnable to the
  422.             ``casual'' system cracker,* and make it more difficult for  the
  423.             sophisticated cracker to penetrate.
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.           _________________________
  436.             * The term ``hacker,'' as applied to computer users, originally
  437.           had an honorable connotation:  ``a person who enjoys learning the
  438.           details  of  programming  systems  and  how  to   stretch   their
  439.           capabilities  - as opposed to most users of computers, who prefer
  440.           to  learn  only  the   minimum   amount   necessary''   [Stee88].
  441.           Unfortunately,  the media has distorted this definition and given
  442.           it a dishonorable meaning.  In deference to the true hackers,  we
  443.           will use the term ``cracker'' throughout this document.
  444.  
  445.  
  446.  
  447.  
  448.                                           4
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                        SECTION 2
  461.  
  462.                                   IMPROVING SECURITY
  463.  
  464.  
  465.  
  466.                  UNIX system security can be divided into three main  areas
  467.             of  concern.   Two of these areas, account security and network
  468.             security, are primarily  concerned  with  keeping  unauthorized
  469.             users  from gaining access to the system.  The third area, file
  470.             system security,  is  concerned  with  preventing  unauthorized
  471.             access,  either  by  legitimate  users or crackers, to the data
  472.             stored in the system.  This section describes the UNIX security
  473.             tools  provided to make each of these areas as secure as possi-
  474.             ble.
  475.  
  476.  
  477.           2.1   ACCOUNT SECURITY
  478.  
  479.  
  480.  
  481.                  One of the easiest ways for a cracker to get into a system
  482.             is by breaking into someone's account.  This is usually easy to
  483.             do, since many systems have old accounts whose users have  left
  484.             the organization, accounts with easy-to-guess passwords, and so
  485.             on.  This section describes methods that can be used  to  avoid
  486.             these problems.
  487.  
  488.  
  489.           2.1.1   Passwords
  490.  
  491.  
  492.  
  493.                  The password is the most vital part of UNIX account  secu-
  494.             rity.  If a cracker can discover a user's password, he can then
  495.             log in to the system and operate with all the  capabilities  of
  496.             that user.  If the password obtained is that of the super-user,
  497.             the problem is more serious:  the cracker will  have  read  and
  498.             write  access  to  every  file on the system.  For this reason,
  499.             choosing secure passwords is extremely important.
  500.  
  501.                  The UNIX _p_a_s_s_w_d program [Sun88a, 379] places very few res-
  502.             trictions  on  what  may  be used as a password.  Generally, it
  503.             requires that passwords contain five or more lowercase letters,
  504.             or  four  characters  if a nonalphabetic or uppercase letter is
  505.             included.  However, if the  user  ``insists''  that  a  shorter
  506.             password be used (by entering it three times), the program will
  507.             allow it.  No checks  for  obviously  insecure  passwords  (see
  508.             below)  are  performed.   Thus, it is incumbent upon the system
  509.             administrator to ensure that the passwords in use on the system
  510.             are secure.
  511.  
  512.  
  513.  
  514.                                           5
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                  In [Morr78], the authors describe experiments conducted to
  526.             determine typical users' habits in the choice of passwords.  In
  527.             a collection of 3,289 passwords, 16% of  them  contained  three
  528.             characters or less, and an astonishing 86% were what could gen-
  529.             erally be described as  insecure.   Additional  experiments  in
  530.             [Gram84]  show  that  by  trying  three  simple guesses on each
  531.             account - the login name, the login name in  reverse,  and  the
  532.             two  concatenated  together  -  a  cracker can expect to obtain
  533.             access to between 8 and 30 percent of the accounts on a typical
  534.             system.   A second experiment showed that by trying the 20 most
  535.             common female first names, followed by a single digit (a  total
  536.             of  200  passwords), at least one password was valid on each of
  537.             several dozen machines surveyed.   Further  experimentation  by
  538.             the  author  has  found  that by trying variations on the login
  539.             name, user's first and last names, and a list  of  nearly  1800
  540.             common  first  names, up to 50  percent of the passwords on any
  541.             given system can be cracked in a matter of two or three days.
  542.  
  543.  
  544.           2.1.1.1   Selecting Passwords
  545.  
  546.  
  547.  
  548.                  The object when choosing a password is to make it as  dif-
  549.             ficult as possible for a cracker to make educated guesses about
  550.             what you've chosen.  This  leaves  him  no  alternative  but  a
  551.             brute-force   search,  trying  every  possible  combination  of
  552.             letters, numbers, and punctuation.  A search of this sort, even
  553.             conducted on a machine that could try one million passwords per
  554.             second (most  machines  can  try  less  than  one  hundred  per
  555.             second),  would require, on the average, over one hundred years
  556.             to complete.  With this as our goal, and by using the  informa-
  557.             tion  in  the  preceding text, a set of guidelines for password
  558.             selection can be constructed:
  559.  
  560.                  +o    _D_o_n'_t  use  your  login  name  in  any  form  (as-is,
  561.                       reversed, capitalized, doubled, etc.).
  562.  
  563.                  +o    _D_o_n'_t use your first or last name in any form.
  564.  
  565.                  +o    _D_o_n'_t use your spouse's or child's name.
  566.  
  567.                  +o    _D_o_n'_t use other  information  easily  obtained  about
  568.                       you.   This includes license plate numbers, telephone
  569.                       numbers, social security numbers, the brand  of  your
  570.                       automobile, the name of the street you live on, etc.
  571.  
  572.                  +o    _D_o_n'_t use a password of all digits, or all  the  same
  573.                       letter.  This significantly decreases the search time
  574.                       for a cracker.
  575.  
  576.                  +o    _D_o_n'_t use a word contained  in  (English  or  foreign
  577.  
  578.  
  579.  
  580.                                           6
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                       language)  dictionaries,  spelling  lists,  or  other
  592.                       lists of words.
  593.  
  594.                  +o    _D_o_n'_t use a password shorter than six characters.
  595.  
  596.                  +o    _D_o use a password with mixed-case alphabetics.
  597.  
  598.                  +o    _D_o use  a  password  with  nonalphabetic  characters,
  599.                       e.g., digits or punctuation.
  600.  
  601.                  +o    _D_o use a password that is easy to  remember,  so  you
  602.                       don't have to write it down.
  603.  
  604.                  +o    _D_o use a password that you can type quickly,  without
  605.                       having to look at the keyboard.  This makes it harder
  606.                       for someone to steal your password by  watching  over
  607.                       your shoulder.
  608.  
  609.                  Although this list may seem to restrict  passwords  to  an
  610.             extreme,  there  are several methods for choosing secure, easy-
  611.             to-remember passwords that obey the above rules.  Some of these
  612.             include the following:
  613.  
  614.                  +o    Choose a line or two from a song or poem, and use the
  615.                       first  letter of each word.  For example, ``In Xanadu
  616.                       did Kubla  Kahn  a  stately  pleasure  dome  decree''
  617.                       becomes ``IXdKKaspdd.''
  618.  
  619.                  +o    Alternate  between  one  consonant  and  one  or  two
  620.                       vowels,  up  to eight characters.  This provides non-
  621.                       sense words that are usually pronounceable, and  thus
  622.                       easily  remembered.   Examples  include  ``routboo,''
  623.                       ``quadpop,'' and so on.
  624.  
  625.                  +o    Choose two short words and concatenate them  together
  626.                       with  a punctation character between them.  For exam-
  627.                       ple: ``dog;rain,'' ``book+mug,'' ``kid?goat.''
  628.  
  629.                  The importance of obeying these password  selection  rules
  630.             cannot  be  overemphasized.   The Internet worm, as part of its
  631.             strategy for breaking into new  machines,  attempted  to  crack
  632.             user  passwords.   First, the worm tried simple choices such as
  633.             the login name, user's first and last names, and so on.   Next,
  634.             the  worm  tried each word present in an internal dictionary of
  635.             432 words (presumably  Morris  considered  these  words  to  be
  636.             ``good''  words  to  try).   If all else failed, the worm tried
  637.             going through the system  dictionary,  /_u_s_r/_d_i_c_t/_w_o_r_d_s,  trying
  638.             each  word  [Spaf88].   The password selection rules above suc-
  639.             cessfully guard against all three of these strategies.
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.                                           7
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.           2.1.1.2   Password Policies
  658.  
  659.  
  660.  
  661.                  Although asking users to select secure passwords will help
  662.             improve  security,  by  itself  it  is  not enough.  It is also
  663.             important to form a set of password  policies  that  all  users
  664.             must obey, in order to keep the passwords secure.
  665.  
  666.                  First and foremost, it is important to  impress  on  users
  667.             the  need  to  keep their passwords in their minds only.  Pass-
  668.             words should never be written down on desk blotters, calendars,
  669.             and  the like.  Further, storing passwords in files on the com-
  670.             puter must be prohibited.  In either case, by writing the pass-
  671.             word  down  on  a  piece  of paper or storing it in a file, the
  672.             security of the user's account  is  totally  dependent  on  the
  673.             security  of  the paper or file, which is usually less than the
  674.             security offered by the password encryption software.
  675.  
  676.                  A second important policy is that users  must  never  give
  677.             out  their  passwords to others.  Many times, a user feels that
  678.             it is easier to give someone else his password in order to copy
  679.             a  file,  rather  than to set up the permissions on the file so
  680.             that it can be copied.  Unfortunately, by giving out the  pass-
  681.             word  to  another person, the user is placing his trust in this
  682.             other person not to distribute the password further,  write  it
  683.             down, and so on.
  684.  
  685.                  Finally, it is important to establish a policy that  users
  686.             must  change  their  passwords  from  time to time, say twice a
  687.             year.  This is difficult to enforce  on  UNIX,  since  in  most
  688.             implementations, a password-expiration scheme is not available.
  689.             However, there are ways to implement  this  policy,  either  by
  690.             using  third-party  software  or by sending a memo to the users
  691.             requesting that they change their passwords.
  692.  
  693.                  This set of policies should be printed and distributed  to
  694.             all  current  users  of the system.  It should also be given to
  695.             all new users when they receive  their  accounts.   The  policy
  696.             usually  carries  more  weight  if you can get it signed by the
  697.             most ``impressive'' person  in  your  organization  (e.g.,  the
  698.             president of the company).
  699.  
  700.  
  701.           2.1.1.3   Checking Password Security
  702.  
  703.  
  704.  
  705.                  The procedures and policies described in the previous sec-
  706.             tions,  when  properly  implemented,  will  greatly  reduce the
  707.             chances of a cracker breaking into your  system  via  a  stolen
  708.             account.   However,  as  with all security measures, you as the
  709.  
  710.  
  711.  
  712.                                           8
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.             system administrator must periodically check to  be  sure  that
  724.             the  policies  and procedures are being adhered to.  One of the
  725.             unfortunate truisms of password security  is  that,  ``left  to
  726.             their own ways, some people will still use cute doggie names as
  727.             passwords'' [Gram84].
  728.  
  729.                  The best way to check the security  of  the  passwords  on
  730.             your  system  is to use a password-cracking program much like a
  731.             real cracker would use.  If you succeed in cracking  any  pass-
  732.             words,  those  passwords  should be changed immediately.  There
  733.             are a few freely available password cracking  programs  distri-
  734.             buted  via various source archive sites; these are described in
  735.             more detail in Section 4.  A fairly extensive cracking  program
  736.             is  also  available  from  the  author.  Alternatively, you can
  737.             write your own cracking program, and  tailor  it  to  your  own
  738.             site.   For  a  list  of  things  to check for, see the list of
  739.             guidelines above.
  740.  
  741.  
  742.           2.1.2   Expiration Dates
  743.  
  744.  
  745.  
  746.                  Many sites, particularly those  with  a  large  number  of
  747.             users,  typically  have several old accounts lying around whose
  748.             owners have since left the organization.  These accounts are  a
  749.             major  security  hole:  not only can they be broken into if the
  750.             password is insecure, but because nobody is using  the  account
  751.             anymore, it is unlikely that a break-in will be noticed.
  752.  
  753.                  The simplest way to prevent unused accounts  from  accumu-
  754.             lating  is to place an expiration date on every account.  These
  755.             expiration dates should be near enough in the future  that  old
  756.             accounts  will  be  deleted  in a timely manner, yet far enough
  757.             apart that the users will not become annoyed.  A good figure is
  758.             usually one year from the date the account was installed.  This
  759.             tends to spread the expirations out over the year, rather  than
  760.             clustering  them  all  at the beginning or end.  The expiration
  761.             date can easily be stored in the password  file  (in  the  full
  762.             name field).  A simple shell script can be used to periodically
  763.             check that all accounts have expiration dates, and that none of
  764.             the dates has passed.
  765.  
  766.                  On the first day of each month, any user whose account has
  767.             expired  should be contacted to be sure he is still employed by
  768.             the organization, and that he is actively  using  the  account.
  769.             Any  user  who  cannot  be  contacted,  or who has not used his
  770.             account recently, should be deleted from the system.  If a user
  771.             is  unavailable  for some reason (e.g., on vacation) and cannot
  772.             be contacted, his account should be disabled by  replacing  the
  773.             encrypted  password in the password file entry with an asterisk
  774.             (*).  This makes it impossible to log in to  the  account,  yet
  775.  
  776.  
  777.  
  778.                                           9
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.             leaves  the  account  available  to be re-enabled on the user's
  790.             return.
  791.  
  792.  
  793.           2.1.3   Guest Accounts
  794.  
  795.  
  796.  
  797.                  Guest accounts present still another  security  hole.   By
  798.             their  nature,  these  accounts are rarely used, and are always
  799.             used by people who should only have access to the  machine  for
  800.             the  short period of time they are guests.  The most secure way
  801.             to handle guest accounts is to install  them  on  an  as-needed
  802.             basis,  and delete them as soon as the people using them leave.
  803.             Guest accounts should never be given simple passwords  such  as
  804.             ``guest'' or ``visitor,'' and should never be allowed to remain
  805.             in the password file when they are not being used.
  806.  
  807.  
  808.           2.1.4   Accounts Without Passwords
  809.  
  810.  
  811.  
  812.                  Some sites have installed  accounts  with  names  such  as
  813.             ``who,''  ``date,'' ``lpq,'' and so on that execute simple com-
  814.             mands.  These accounts are intended to allow users  to  execute
  815.             these  commands without having to log in to the machine.  Typi-
  816.             cally these accounts have no password associated with them, and
  817.             can  thus  be used by anyone.  Many of the accounts are given a
  818.             user id of zero, so that they execute with  super-user  permis-
  819.             sions.
  820.  
  821.                  The problem with these accounts is that they  open  poten-
  822.             tial  security  holes.  By not having passwords on them, and by
  823.             having  super-user  permissions,  these  accounts   practically
  824.             invite  crackers  to  try  to  penetrate them.  Usually, if the
  825.             cracker can  gain  access  to  the  system,  penetrating  these
  826.             accounts  is  simple, because each account executes a different
  827.             command.  If the cracker can replace any one of these  commands
  828.             with one of his own, he can then use the unprotected account to
  829.             execute his program with super-user permissions.
  830.  
  831.                  Simply put,  accounts  without  passwords  should  not  be
  832.             allowed on any UNIX system.
  833.  
  834.  
  835.           2.1.5   Group Accounts and Groups
  836.  
  837.  
  838.  
  839.                  Group accounts have become popular at many sites, but  are
  840.             actually  a  break-in  waiting to happen.  A group account is a
  841.  
  842.  
  843.  
  844.                                          10
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.             single account shared by several people, e.g., by all the  col-
  856.             laborators  on a project.  As mentioned in the section on pass-
  857.             word security, users should not share  passwords  -  the  group
  858.             account  concept directly violates this policy.  The proper way
  859.             to allow users to share information, rather than giving them  a
  860.             group  account  to  use,  is to place these users into a group.
  861.             This is done by editing the  group  file,  /_e_t_c/_g_r_o_u_p  [Sun88a,
  862.             1390;  Sun88b, 66], and creating a new group with the users who
  863.             wish to collaborate listed as members.
  864.  
  865.                  A line in the group file looks like
  866.  
  867.                     groupname:password:groupid:user1,user2,user3,...
  868.  
  869.             The _g_r_o_u_p_n_a_m_e is the name assigned to the group,  much  like  a
  870.             login  name.   It  may  be the same as someone's login name, or
  871.             different.  The maximum length of a group name is eight charac-
  872.             ters.   The password field is unused in BSD-derived versions of
  873.             UNIX, and should contain an asterisk (*).   The  _g_r_o_u_p_i_d  is  a
  874.             number  from 0 to 65535 inclusive.  Generally, numbers below 10
  875.             are reserved for special  purposes,  but  you  may  choose  any
  876.             unused number.  The last field is a comma-separated (no spaces)
  877.             list of the login names of the users in the group.  If no login
  878.             names  are  listed, then the group has no members.  To create a
  879.             group called ``hackers'' with Huey, Duey, and Louie as members,
  880.             you would add a line such as this to the group file:
  881.  
  882.                     hackers:*:100:huey,duey,louie
  883.  
  884.  
  885.                  After the group has been created,  the  files  and  direc-
  886.             tories  the  members  wish to share can then be changed so that
  887.             they are owned by this group, and the group permission bits  on
  888.             the  files  and  directories can be set to allow sharing.  Each
  889.             user retains his own account, with his own password, thus  pro-
  890.             tecting the security of the system.
  891.  
  892.                  For example, to change Huey's ``programs'' directory to be
  893.             owned  by  the new group and properly set up the permissions so
  894.             that all members of the group may  access  it,  the  _c_h_g_r_p  and
  895.             _c_h_m_o_d commands would be used as follows [Sun88a, 63-66]:
  896.  
  897.                     # chgrp hackers ~huey/programs
  898.                     # chmod -R g+rw ~huey/programs
  899.  
  900.  
  901.  
  902.           2.1.6   Yellow Pages
  903.  
  904.  
  905.  
  906.                  The Sun Yellow Pages system [Sun88b, 349-374] allows  many
  907.  
  908.  
  909.  
  910.                                          11
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.             hosts to share password files, group files, and other files via
  922.             the network, while the files are stored on only a single  host.
  923.             Unfortunately, Yellow Pages also contains a few potential secu-
  924.             rity holes.
  925.  
  926.                  The principal way Yellow Pages works is to have a  special
  927.             line  in  the  password or group file that begins with a ``+''.
  928.             In the password file, this line looks like
  929.  
  930.                     +::0:0:::
  931.  
  932.             and in the group file, it looks like
  933.  
  934.                     +:
  935.  
  936.             These lines should only be present in the files stored on  Yel-
  937.             low  Pages  client machines.  They should not be present in the
  938.             files on the Yellow Pages master machine(s).   When  a  program
  939.             reads  the  password  or group file and encounters one of these
  940.             lines, it goes through the network and requests the information
  941.             it wants from the Yellow Pages server instead of trying to find
  942.             it in the local file.  In this way, the data does not  have  to
  943.             be  maintained on every host.  Since the master machine already
  944.             has all the information, there is no need for this special line
  945.             to be present there.
  946.  
  947.                  Generally speaking, the Yellow  Pages  service  itself  is
  948.             reasonably  secure.   There are a few openings that a sophisti-
  949.             cated (and dedicated) cracker could exploit, but Sun is rapidly
  950.             closing  these.   The  biggest problem with Yellow Pages is the
  951.             ``+'' line in the password file.  If the ``+'' is deleted  from
  952.             the  front of the line, then this line loses its special Yellow
  953.             Pages meaning.  It instead becomes a regular password file line
  954.             for an account with a null login name, no password, and user id
  955.             zero (super-user).  Thus, if a  careless  system  administrator
  956.             accidentally  deletes the ``+''.  the whole system is wide open
  957.             to any attack.*
  958.  
  959.                  Yellow Pages is too useful a service to suggest turning it
  960.             off,  although  turning  it  off  would  make  your system more
  961.             secure.  Instead, it is recommended that you read carefully the
  962.             information  in  the  Sun manuals in order to be fully aware of
  963.             Yellow Pages' abilities and its limitations.
  964.  
  965.  
  966.           2.2   NETWORK SECURITY
  967.  
  968.  
  969.           _________________________
  970.             * Actually, a line like this without a ``+''  is  dangerous  in
  971.           any password file, regardless of whether Yellow Pages is in use.
  972.  
  973.  
  974.  
  975.  
  976.                                          12
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                  As trends  toward  internetworking  continue,  most  sites
  988.             will, if they haven't already, connect themselves to one of the
  989.             numerous regional networks springing  up  around  the  country.
  990.             Most  of these regional networks are also interconnected, form-
  991.             ing the Internet [Hind83, Quar86].  This means that  the  users
  992.             of  your  machine  can  access other hosts and communicate with
  993.             other users around the world.   Unfortunately,  it  also  means
  994.             that  other  hosts  and  users from around the world can access
  995.             your machine, and attempt to break into it.
  996.  
  997.                  Before internetworking became  commonplace,  protecting  a
  998.             system  from  unauthorized  access  simply  meant  locking  the
  999.             machine in a room by itself.  Now that machines  are  connected
  1000.             by networks, however, security is much more complex.  This sec-
  1001.             tion describes the tools and methods  available  to  make  your
  1002.             UNIX networks as secure as possible.
  1003.  
  1004.  
  1005.           2.2.1   Trusted Hosts
  1006.  
  1007.  
  1008.  
  1009.                  One of the most convenient features of the  Berkeley  (and
  1010.             Sun)  UNIX  networking  software  is the concept of ``trusted''
  1011.             hosts.  The software allows the specification  of  other  hosts
  1012.             (and  possibly users) who are to be considered trusted - remote
  1013.             logins and remote command executions from these hosts  will  be
  1014.             permitted without requiring the user to enter a password.  This
  1015.             is very convenient, because users do not  have  to  type  their
  1016.             password  every  time they use the network.  Unfortunately, for
  1017.             the same  reason,  the  concept  of  a  trusted  host  is  also
  1018.             extremely insecure.
  1019.  
  1020.                  The Internet worm made extensive use of the  trusted  host
  1021.             concept to spread itself throughout the network [Seel88].  Many
  1022.             sites that had already disallowed trusted hosts did fairly well
  1023.             against  the  worm  compared  with  those  sites that did allow
  1024.             trusted hosts.  Even though it is a security  hole,  there  are
  1025.             some  valid  uses  for  the trusted host concept.  This section
  1026.             describes how to properly implement the trusted hosts  facility
  1027.             while preserving as much security as possible.
  1028.  
  1029.  
  1030.           2.2.1.1   The hosts.equiv File
  1031.  
  1032.  
  1033.  
  1034.                  The file /_e_t_c/_h_o_s_t_s._e_q_u_i_v [Sun88a, 1397] can  be  used  by
  1035.             the  system  administrator  to  indicate  trusted  hosts.  Each
  1036.             trusted host is listed in the file, one host per  line.   If  a
  1037.             user  attempts  to  log  in (using _r_l_o_g_i_n) or execute a command
  1038.             (using  _r_s_h)  remotely  from  one  of  the  systems  listed  in
  1039.  
  1040.  
  1041.  
  1042.                                          13
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.             _h_o_s_t_s._e_q_u_i_v,  and  that user has an account on the local system
  1054.             with the same login name, access is permitted without requiring
  1055.             a password.
  1056.  
  1057.                  Provided adequate care is taken to allow only local  hosts
  1058.             in  the _h_o_s_t_s._e_q_u_i_v file, a reasonable compromise between secu-
  1059.             rity and convenience can be achieved.  Nonlocal hosts  (includ-
  1060.             ing  hosts  at  remote  sites  of the same organization) should
  1061.             never be trusted.  Also, if there  are  any  machines  at  your
  1062.             organization that are installed in ``public'' areas (e.g., ter-
  1063.             minal rooms) as opposed to  private  offices,  you  should  not
  1064.             trust these hosts.
  1065.  
  1066.                  On Sun systems, _h_o_s_t_s._e_q_u_i_v is controlled with the  Yellow
  1067.             Pages  software.   As distributed, the default _h_o_s_t_s._e_q_u_i_v file
  1068.             distributed by Sun contains a single line:
  1069.  
  1070.                     +
  1071.  
  1072.             This indicates that _e_v_e_r_y _k_n_o_w_n _h_o_s_t (i.e., the  complete  con-
  1073.             tents  of  the  host file) should be considered a trusted host.
  1074.             This is totally incorrect and  a  major  security  hole,  since
  1075.             hosts  outside  the local organization should never be trusted.
  1076.             A  correctly  configured  _h_o_s_t_s._e_q_u_i_v  should  never  list  any
  1077.             ``wildcard''  hosts  (such  as  the  ``+''); only specific host
  1078.             names should be used.  When installing a new  system  from  Sun
  1079.             distribution  tapes,  you  should be sure to either replace the
  1080.             Sun default _h_o_s_t_s._e_q_u_i_v with a  correctly  configured  one,  or
  1081.             delete the file altogether.
  1082.  
  1083.  
  1084.           2.2.1.2   The .rhosts File
  1085.  
  1086.  
  1087.  
  1088.                  The ._r_h_o_s_t_s file [Sun88a, 1397] is similar in concept  and
  1089.             format  to the _h_o_s_t_s._e_q_u_i_v file, but allows trusted access only
  1090.             to specific host-user combinations, rather  than  to  hosts  in
  1091.             general.*  Each user may create a  ._r_h_o_s_t_s  file  in  his  home
  1092.             directory,  and allow access to her account without a password.
  1093.             Most people use this mechanism to allow trusted access  between
  1094.             accounts  they have on systems owned by different organizations
  1095.             who do not trust each other's  hosts  in  _h_o_s_t_s._e_q_u_i_v.   Unfor-
  1096.             tunately,  this  file presents a major security problem:  While
  1097.             _h_o_s_t_s._e_q_u_i_v is under the system administrator's control and can
  1098.             be  managed  effectively,  any  user  may create a ._r_h_o_s_t_s file
  1099.             granting access to whomever  he  chooses,  without  the  system
  1100.             administrator's knowledge.
  1101.           _________________________
  1102.              Actually,  _h_o_s_t_s._e_q_u_i_v  may  be  used  to  specify  host-user
  1103.           combinations as well, but this is rarely done.
  1104.  
  1105.  
  1106.  
  1107.  
  1108.                                          14
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                  The only secure way to manage ._r_h_o_s_t_s  files  is  to  com-
  1120.             pletely  disallow them on the system.  The system administrator
  1121.             should check the system often for  violations  of  this  policy
  1122.             (see  Section 3.3.1.4).  One possible exception to this rule is
  1123.             the ``root'' account; a ._r_h_o_s_t_s file may be necessary to  allow
  1124.             network backups and the like to be completed.
  1125.  
  1126.  
  1127.           2.2.2   Secure Terminals
  1128.  
  1129.  
  1130.  
  1131.                  Under newer versions of UNIX, the concept of a  ``secure''
  1132.             terminal  has  been  introduced.   Simply  put,  the super-user
  1133.             (``root'') may not log in on a nonsecure terminal, even with  a
  1134.             password.   (Authorized  users  may still use the _s_u command to
  1135.             become super-user, however.)   The  file  /_e_t_c/_t_t_y_t_a_b  [Sun88a,
  1136.             1478]  is  used  to  control  which  terminals  are  considered
  1137.             secure.|- A short excerpt from this file is shown below.
  1138.  
  1139.                     console  "/usr/etc/getty std.9600"  sun      off secure
  1140.                     ttya     "/usr/etc/getty std.9600"  unknown  off secure
  1141.                     ttyb     "/usr/etc/getty std.9600"  unknown  off secure
  1142.                     ttyp0    none                       network  off secure
  1143.                     ttyp1    none                       network  off secure
  1144.                     ttyp2    none                       network  off secure
  1145.  
  1146.             The keyword ``secure'' at the end of each line  indicates  that
  1147.             the terminal is considered secure.  To remove this designation,
  1148.             simply edit the file and delete the ``secure'' keyword.   After
  1149.             saving the file, type the command (as super-user):
  1150.  
  1151.                     # kill -HUP 1
  1152.  
  1153.             This tells the _i_n_i_t process to reread the _t_t_y_t_a_b file.
  1154.  
  1155.                  The Sun default configuration for _t_t_y_t_a_b  is  to  consider
  1156.             all  terminals  secure,  including ``pseudo'' terminals used by
  1157.             the remote login software.  This means that ``root'' may log in
  1158.             remotely  from  any  host on the network.  A more secure confi-
  1159.             guration would consider as secure only directly connected  ter-
  1160.             minals,  or  perhaps only the console device.  This is how file
  1161.             servers and other machines with disks should be set up.
  1162.  
  1163.                  The most secure configuration is to remove the  ``secure''
  1164.             designation  from  all terminals, including the console device.
  1165.             This requires that those users with super-user authority  first
  1166.             log in as themselves, and then become the super-user via the _s_u
  1167.           _________________________
  1168.             |- Under non-Sun versions of Berkeley UNIX, this file is  called
  1169.           /_e_t_c/_t_t_y_s.
  1170.  
  1171.  
  1172.  
  1173.  
  1174.                                          15
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.             command.  It also requires the ``root'' password to be  entered
  1186.             when  rebooting  in single-user mode, in order to prevent users
  1187.             from rebooting their desktop workstations and obtaining  super-
  1188.             user  access.   This is how all diskless client machines should
  1189.             be set up.
  1190.  
  1191.  
  1192.           2.2.3   The Network File System
  1193.  
  1194.  
  1195.  
  1196.                  The Network File System  (NFS)  [Sun88d]  is  designed  to
  1197.             allow  several  hosts  to share files over the network.  One of
  1198.             the most common uses of NFS is to allow  diskless  workstations
  1199.             to be installed in offices, while keeping all disk storage in a
  1200.             central location.  As distributed by Sun, NFS has  no  security
  1201.             features enabled.  This means that any host on the Internet may
  1202.             access your files via NFS, regardless of whether you trust them
  1203.             or not.
  1204.  
  1205.                  Fortunately, there are several easy ways to make NFS  more
  1206.             secure.   The  more commonly used methods are described in this
  1207.             section, and these can be used to make your files quite  secure
  1208.             from  unauthorized  access  via NFS.  Secure NFS, introduced in
  1209.             SunOS Release 4.0,  takes  security  one  step  further,  using
  1210.             public-key  encryption  techniques to ensure authorized access.
  1211.             Discussion of secure NFS is deferred until Section 4.
  1212.  
  1213.  
  1214.           2.2.3.1   The exports File
  1215.  
  1216.  
  1217.  
  1218.                  The file /_e_t_c/_e_x_p_o_r_t_s [Sun88a, 1377] is perhaps one of the
  1219.             most  important  parts  of  NFS configuration.  This file lists
  1220.             which file systems are exported (made available  for  mounting)
  1221.             to  other  systems.  A typical _e_x_p_o_r_t_s file as installed by the
  1222.             Sun installation procedure looks something like this:
  1223.  
  1224.                     /usr
  1225.                     /home
  1226.                     /var/spool/mail
  1227.                     #
  1228.                     /export/root/client1    -access=client1,root=client1
  1229.                     /export/swap/client1    -access=client1,root=client1
  1230.                     #
  1231.                     /export/root/client2    -access=client2,root=client2
  1232.                     /export/swap/client2    -access=client2,root=client2
  1233.  
  1234.             The _r_o_o_t= keyword specifies the list of hosts that are  allowed
  1235.             to  have  super-user  access  to  the  files  in the named file
  1236.             system.   This  keyword  is  discussed  in  detail  in  Section
  1237.  
  1238.  
  1239.  
  1240.                                          16
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.             2.2.3.3.   The  _a_c_c_e_s_s=  keyword  specifies  the  list of hosts
  1252.             (separated by colons) that are allowed to mount the named  file
  1253.             system.   If no _a_c_c_e_s_s= keyword is specified for a file system,
  1254.             any host anywhere on the network may mount that file system via
  1255.             NFS.
  1256.  
  1257.                  Obviously, this presents a major security  problem,  since
  1258.             anyone  who can mount your file systems via NFS can then peruse
  1259.             them at her leisure.  Thus, it is important that all file  sys-
  1260.             tems  listed in _e_x_p_o_r_t_s have an _a_c_c_e_s_s= keyword associated with
  1261.             them.  If you have only a few hosts which  must  mount  a  file
  1262.             system, you can list them individually in the file:
  1263.  
  1264.                     /usr    -access=host1:host2:host3:host4:host5
  1265.  
  1266.             However, because the maximum number of hosts that can be listed
  1267.             this  way is ten, the _a_c_c_e_s_s= keyword will also allow netgroups
  1268.             to be specified.  Netgroups are described in the next section.
  1269.  
  1270.                  After making any changes to the _e_x_p_o_r_t_s file,  you  should
  1271.             run the command
  1272.  
  1273.                     # exportfs -a
  1274.  
  1275.             in order to make the changes take effect.
  1276.  
  1277.  
  1278.           2.2.3.2   The netgroup File
  1279.  
  1280.  
  1281.  
  1282.                  The file /_e_t_c/_n_e_t_g_r_o_u_p [Sun88a, 1407] is  used  to  define
  1283.             netgroups.   This  file is controlled by Yellow Pages, and must
  1284.             be rebuilt in the Yellow Pages maps whenever  it  is  modified.
  1285.             Consider the following sample _n_e_t_g_r_o_u_p file:
  1286.  
  1287.                     A_Group      (servera,,) (clienta1,,) (clienta2,,)
  1288.  
  1289.                     B_Group      (serverb,,) (clientb1,,) (clientb2,,)
  1290.  
  1291.                     AdminStaff   (clienta1,mary,) (clientb3,joan,)
  1292.  
  1293.                     AllSuns      A_Group B_Group
  1294.  
  1295.             This file defines  four  netgroups,  called  _A__G_r_o_u_p,  _B__G_r_o_u_p,
  1296.             _A_d_m_i_n_S_t_a_f_f,  and  _A_l_l_S_u_n_s.   The _A_l_l_S_u_n_s netgroup is actually a
  1297.             ``super group'' containing all the members of the  _A__G_r_o_u_p  and
  1298.             _B__G_r_o_u_p netgroups.
  1299.  
  1300.                  Each member of a netgroup is defined as a  triple:  (host,
  1301.             user,  domain).  Typically, the _d_o_m_a_i_n field is never used, and
  1302.             is simply left blank.  If either the _h_o_s_t or _u_s_e_r field is left
  1303.  
  1304.  
  1305.  
  1306.                                          17
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.             blank,  then any host or user is considered to match.  Thus the
  1318.             triple (host,,) matches any user on the named host,  while  the
  1319.             triple (,user,) matches the named user on any host.
  1320.  
  1321.                  Netgroups are useful when restricting access to  NFS  file
  1322.             systems via the _e_x_p_o_r_t_s file.  For example, consider this modi-
  1323.             fied version of the file from the previous section:
  1324.  
  1325.                     /usr                    -access=A_Group
  1326.                     /home                   -access=A_Group:B_Group
  1327.                     /var/spool/mail         -access=AllSuns
  1328.                     #
  1329.                     /export/root/client1    -access=client1,root=client1
  1330.                     /export/swap/client1    -access=client1,root=client1
  1331.                     #
  1332.                     /export/root/client2    -access=client2,root=client2
  1333.                     /export/swap/client2    -access=client2,root=client2
  1334.  
  1335.             The /_u_s_r file system may now only be mounted by  the  hosts  in
  1336.             the _A__G_r_o_u_p netgroup, that is, _s_e_r_v_e_r_a, _c_l_i_e_n_t_a_1, and _c_l_i_e_n_t_a_2.
  1337.             Any other host that  tries  to  mount  this  file  system  will
  1338.             receive  an ``access denied'' error.  The /_h_o_m_e file system may
  1339.             be mounted by any of the hosts in either the _A__G_r_o_u_p or _B__G_r_o_u_p
  1340.             netgroups.   The /_v_a_r/_s_p_o_o_l/_m_a_i_l file system is also restricted
  1341.             to these hosts, but in this example we used the ``super group''
  1342.             called _A_l_l_S_u_n_s.
  1343.  
  1344.                  Generally, the best way to configure the _n_e_t_g_r_o_u_p file  is
  1345.             to make a single netgroup for each file server and its clients,
  1346.             and then to make other super groups,  such  as  _A_l_l_S_u_n_s.   This
  1347.             allows  you  the  flexibility  to specify the smallest possible
  1348.             group of hosts for each file system in /_e_t_c/_e_x_p_o_r_t_s.
  1349.  
  1350.                  Netgroups can also be used in the password file  to  allow
  1351.             access  to a given host to be restricted to the members of that
  1352.             group, and they can be used in the _h_o_s_t_s._e_q_u_i_v file to central-
  1353.             ize  maintenance  of the list of trusted hosts.  The procedures
  1354.             for doing this are defined in more detail in the Sun manual.
  1355.  
  1356.  
  1357.           2.2.3.3   Restricting Super-User Access
  1358.  
  1359.  
  1360.  
  1361.                  Normally, NFS translates the super-user id to a special id
  1362.             called ``nobody'' in order to prevent a user with ``root'' on a
  1363.             remote workstation from accessing other people's  files.   This
  1364.             is  good  for  security,  but  sometimes  a nuisance for system
  1365.             administration, since you  cannot  make  changes  to  files  as
  1366.             ``root'' through NFS.
  1367.  
  1368.                  The _e_x_p_o_r_t_s file  also  allows  you  to  grant  super-user
  1369.  
  1370.  
  1371.  
  1372.                                          18
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.             access  to  certain file systems for certain hosts by using the
  1384.             _r_o_o_t= keyword.  Following this keyword a  colon-separated  list
  1385.             of  up  to  ten  hosts  may  be  specified; these hosts will be
  1386.             allowed to access the file system as  ``root''  without  having
  1387.             the  user  id  converted  to  ``nobody.''  Netgroups may not be
  1388.             specified to the _r_o_o_t= keyword.
  1389.  
  1390.                  Granting ``root'' access to a  host  should  not  be  done
  1391.             lightly.   If a host has ``root'' access to a file system, then
  1392.             the super-user on that host will have complete  access  to  the
  1393.             file system, just as if you had given him the ``root'' password
  1394.             on the server.  Untrusted hosts should never be given  ``root''
  1395.             access to NFS file systems.
  1396.  
  1397.  
  1398.           2.2.4   FTP
  1399.  
  1400.  
  1401.  
  1402.                  The File Transfer Protocol, implemented  by  the  _f_t_p  and
  1403.             _f_t_p_d  programs  [Sun88a,  195-201,  1632-1634], allows users to
  1404.             connect to remote systems and transfer files  back  and  forth.
  1405.             Unfortunately,  older  versions  of  these  programs  also  had
  1406.             several bugs in them that allowed crackers to break into a sys-
  1407.             tem.   These bugs have been fixed by Berkeley, and new versions
  1408.             are available.  If your  _f_t_p_d*  was  obtained  before  December
  1409.             1988, you should get a newer version (see Section 4).
  1410.  
  1411.                  One  of  the  more  useful  features   of   FTP   is   the
  1412.             ``anonymous''  login.   This  special login allows users who do
  1413.             not have an account on your machine to have  restricted  access
  1414.             in  order to transfer files from a specific directory.  This is
  1415.             useful if you wish to distribute  software  to  the  public  at
  1416.             large  without  giving  each  person  who wants the software an
  1417.             account on your machine.  In order to securely set up anonymous
  1418.             FTP you should follow the specific instructions below:
  1419.  
  1420.                  1.   Create  an  account  called  ``ftp.''   Disable   the
  1421.                       account  by  placing  an asterisk (*) in the password
  1422.                       field.  Give the account a  special  home  directory,
  1423.                       such as /_u_s_r/_f_t_p or /_u_s_r/_s_p_o_o_l/_f_t_p.
  1424.  
  1425.                  2.   Make the home directory owned by ``ftp'' and  unwrit-
  1426.                       able by anyone:
  1427.  
  1428.                               # chown ftp ~ftp
  1429.                               # chmod 555 ~ftp
  1430.  
  1431.           _________________________
  1432.             * On Sun systems, _f_t_p_d is stored in the file  /_u_s_r/_e_t_c/_i_n._f_t_p_d.
  1433.           On most other systems, it is called /_e_t_c/_f_t_p_d.
  1434.  
  1435.  
  1436.  
  1437.  
  1438.                                          19
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.                  3.   Make the directory ~_f_t_p/_b_i_n, owned by the  super-user
  1450.                       and  unwritable  by  anyone.   Place a copy of the _l_s
  1451.                       program in this directory:
  1452.  
  1453.                               # mkdir ~ftp/bin
  1454.                               # chown root ~ftp/bin
  1455.                               # chmod 555 ~ftp/bin
  1456.                               # cp -p /bin/ls ~ftp/bin
  1457.                               # chmod 111 ~ftp/bin/ls
  1458.  
  1459.  
  1460.                  4.   Make the directory ~_f_t_p/_e_t_c, owned by the  super-user
  1461.                       and  unwritable by anyone.  Place copies of the pass-
  1462.                       word and group files in this directory, with all  the
  1463.                       password  fields  changed  to asterisks (*).  You may
  1464.                       wish to delete all but a  few  of  the  accounts  and
  1465.                       groups  from  these files; the only account that must
  1466.                       be present is ``ftp.''
  1467.  
  1468.                               # mkdir ~ftp/etc
  1469.                               # chown root ~ftp/etc
  1470.                               # chmod 555 ~ftp/etc
  1471.                               # cp -p /etc/passwd /etc/group ~ftp/etc
  1472.                               # chmod 444 ~ftp/etc/passwd ~ftp/etc/group
  1473.  
  1474.  
  1475.                  5.   Make the directory ~_f_t_p/_p_u_b,  owned  by  ``ftp''  and
  1476.                       world-writable.   Users may then place files that are
  1477.                       to be accessible via anonymous FTP in this directory:
  1478.  
  1479.                               # mkdir ~ftp/pub
  1480.                               # chown ftp ~ftp/pub
  1481.                               # chmod 777 ~ftp/pub
  1482.  
  1483.  
  1484.                  Because the anonymous FTP feature allows anyone to  access
  1485.             your  system  (albeit  in a very limited way), it should not be
  1486.             made available on every host  on  the  network.   Instead,  you
  1487.             should  choose  one  machine (preferably a server or standalone
  1488.             host) on which to allow this service.   This  makes  monitoring
  1489.             for  security  violations  much easier.  If you allow people to
  1490.             transfer files to your machine (using  the  world-writable  _p_u_b
  1491.             directory,  described  above),  you should check often the con-
  1492.             tents of the directories into which they are allowed to  write.
  1493.             Any suspicious files you find should be deleted.
  1494.  
  1495.  
  1496.           2.2.4.1   Trivial FTP
  1497.  
  1498.  
  1499.  
  1500.                  The Trivial File Transfer Protocol, TFTP, is used  on  Sun
  1501.  
  1502.  
  1503.  
  1504.                                          20
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.             workstations  (and others) to allow diskless hosts to boot from
  1516.             the network.  Basically, TFTP is a stripped-down version of FTP
  1517.             -  there is no user authentication, and the connection is based
  1518.             on the User Datagram Protocol instead of the Transmission  Con-
  1519.             trol  Protocol.  Because they are so stripped-down, many imple-
  1520.             mentations of TFTP have security holes.  You should check  your
  1521.             hosts by executing the command sequence shown below.
  1522.  
  1523.                     % tftp
  1524.                     tftp> connect _y_o_u_r_h_o_s_t
  1525.                     tftp> get /etc/motd tmp
  1526.                     _E_r_r_o_r _c_o_d_e _1: _F_i_l_e _n_o_t _f_o_u_n_d
  1527.                     _t_f_t_p> _q_u_i_t
  1528.                     %
  1529.  
  1530.             If your version does not respond with ``_F_i_l_e _n_o_t  _f_o_u_n_d,''  and
  1531.             instead  transfers the file, you should replace your version of
  1532.             _t_f_t_p_d* with a newer one.   In  particular,  versions  of  SunOS
  1533.             prior to release 4.0 are known to have this problem.
  1534.  
  1535.  
  1536.           2.2.5   Mail
  1537.  
  1538.  
  1539.  
  1540.                  Electronic mail is one of the main reasons for  connecting
  1541.             to outside networks.  On most versions of Berkeley-derived UNIX
  1542.             systems,  including  those  from  Sun,  the  _s_e_n_d_m_a_i_l   program
  1543.             [Sun88a,  1758-1760;  Sun88b,  441-488]  is  used to enable the
  1544.             receipt and delivery of mail.  As with the FTP software,  older
  1545.             versions of _s_e_n_d_m_a_i_l have several bugs that allow security vio-
  1546.             lations.  One of these bugs was used with great success by  the
  1547.             Internet  worm  [Seel88, Spaf88].  The current version of _s_e_n_d_-
  1548.             _m_a_i_l from Berkeley is version 5.61, of January 1989.   Sun  is,
  1549.             as  of  this  writing, still shipping version 5.59, which has a
  1550.             known security problem.  They have, however, made a fixed  ver-
  1551.             sion  available.   Section  4 details how to obtain these newer
  1552.             versions.
  1553.  
  1554.                  Generally, with the exception of the security  holes  men-
  1555.             tioned  above,  _s_e_n_d_m_a_i_l is reasonably secure when installed by
  1556.             most vendors' installation procedures.  There are,  however,  a
  1557.             few  precautions  that  should be taken to ensure secure opera-
  1558.             tion:
  1559.  
  1560.                  1.   Remove the ``decode'' alias  from  the  aliases  file
  1561.                       (/_e_t_c/_a_l_i_a_s_e_s or /_u_s_r/_l_i_b/_a_l_i_a_s_e_s).
  1562.           _________________________
  1563.             * On   Sun   systems,   _t_f_t_p_d   is   stored   in    the    file
  1564.           /_u_s_r/_e_t_c/_i_n._t_f_t_p_d.    On   most   other  systems,  it  is  called
  1565.           /_e_t_c/_t_f_t_p_d.
  1566.  
  1567.  
  1568.  
  1569.  
  1570.                                          21
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.                  2.   If you create aliases that allow messages to be  sent
  1582.                       to  programs, be absolutely sure that there is no way
  1583.                       to obtain a shell or send commands to  a  shell  from
  1584.                       these programs.
  1585.  
  1586.                  3.   Make sure the ``wizard'' password is disabled in  the
  1587.                       configuration  file, _s_e_n_d_m_a_i_l._c_f.  (Unless you modify
  1588.                       the distributed configuration files,  this  shouldn't
  1589.                       be a problem.)
  1590.  
  1591.                  4.   Make  sure  your  _s_e_n_d_m_a_i_l  does  not   support   the
  1592.                       ``debug'' command.  This can be done with the follow-
  1593.                       ing commands:
  1594.  
  1595.                       % telnet localhost 25
  1596.                       220 yourhost Sendmail 5.61 ready at 9 Mar 90 10:57:36 PST
  1597.                       debug
  1598.                       500 Command unrecognized
  1599.                       quit
  1600.                       %
  1601.  
  1602.  
  1603.                       If your _s_e_n_d_m_a_i_l responds to  the  ``debug''  command
  1604.                       with  ``_2_0_0  _D_e_b_u_g  _s_e_t,'' then you are vulnerable to
  1605.                       attack and should replace your _s_e_n_d_m_a_i_l with a  newer
  1606.                       version.
  1607.  
  1608.             By following the procedures above, you can be  sure  that  your
  1609.             mail system is secure.
  1610.  
  1611.  
  1612.           2.2.6   Finger
  1613.  
  1614.  
  1615.  
  1616.                  The ``finger'' service, provided  by  the  _f_i_n_g_e_r  program
  1617.             [Sun88a,  186-187],  allows  you  to obtain information about a
  1618.             user such as her full name, home directory,  last  login  time,
  1619.             and  in  some cases when she last received mail and/or read her
  1620.             mail.  The _f_i_n_g_e_r_d  program  [Sun88a,  1625]  allows  users  on
  1621.             remote hosts to obtain this information.
  1622.  
  1623.                  A bug in _f_i_n_g_e_r_d was also exercised with  success  by  the
  1624.             Internet worm [Seel88, Spaf88].  If your version of _f_i_n_g_e_r_d* is
  1625.             older than November 5, 1988, it should be replaced with a newer
  1626.             version.  New  versions  are  available  from  several  of  the
  1627.             sources described in Section 4.
  1628.  
  1629.           _________________________
  1630.             * On Sun systems, _f_i_n_g_e_r_d is stored in /_u_s_r/_e_t_c/_i_n._f_i_n_g_e_r_d.  On
  1631.           most other systems, it is called /_e_t_c/_f_i_n_g_e_r_d.
  1632.  
  1633.  
  1634.  
  1635.  
  1636.                                          22
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.           2.2.7   Modems and Terminal Servers
  1648.  
  1649.  
  1650.  
  1651.                  Modems and  terminal  servers  (terminal  switches,  Annex
  1652.             boxes,  etc.) present still another potential security problem.
  1653.             The main problem with these devices is one of  configuration  -
  1654.             misconfigured hardware can allow security breaches.  Explaining
  1655.             how to configure every brand of modem and terminal server would
  1656.             require  volumes.   However,  the  following  items  should  be
  1657.             checked for on any modems or terminal servers installed at your
  1658.             site:
  1659.  
  1660.                  1.   If a user dialed up to a modem hangs  up  the  phone,
  1661.                       the  system should log him out.  If it doesn't, check
  1662.                       the hardware connections and the kernel configuration
  1663.                       of the serial ports.
  1664.  
  1665.                  2.   If a user logs off, the system should force the modem
  1666.                       to hang up.  Again, check the hardware connections if
  1667.                       this doesn't work.
  1668.  
  1669.                  3.   If the connection from a terminal server to the  sys-
  1670.                       tem is broken, the system should log the user off.
  1671.  
  1672.                  4.   If the terminal server is connected  to  modems,  and
  1673.                       the  user hangs up, the terminal server should inform
  1674.                       the system that the user has hung up.
  1675.  
  1676.                  Most modem and terminal server manuals cover in detail how
  1677.             to  properly connect these devices to your system.  In particu-
  1678.             lar you should pay close attention to the  ``Carrier  Detect,''
  1679.             ``Clear to Send,'' and ``Request to Send'' connections.
  1680.  
  1681.  
  1682.           2.2.8   Firewalls
  1683.  
  1684.  
  1685.  
  1686.                  One of the newer ideas in network security is  that  of  a
  1687.             _f_i_r_e_w_a_l_l.   Basically,  a  firewall is a special host that sits
  1688.             between  your  outside-world  network  connection(s)  and  your
  1689.             internal  network(s).   This  host  does  not  send out routing
  1690.             information about your internal network, and thus the  internal
  1691.             network is ``invisible'' from the outside.  In order to config-
  1692.             ure a firewall machine, the following considerations need to be
  1693.             taken:
  1694.  
  1695.                  1.   The firewall does not advertise routes.   This  means
  1696.                       that users on the internal network must log in to the
  1697.                       firewall in order to access hosts on remote networks.
  1698.                       Likewise,  in  order  to  log  in  to  a  host on the
  1699.  
  1700.  
  1701.  
  1702.                                          23
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.                       internal network from the outside, a user must  first
  1714.                       log  in  to  the  firewall  machine.   This is incon-
  1715.                       venient, but more secure.
  1716.  
  1717.                  2.   All electronic mail sent by your users must  be  for-
  1718.                       warded  to  the  firewall  machine  if  it  is  to be
  1719.                       delivered  outside  your   internal   network.    The
  1720.                       firewall  must  receive all incoming electronic mail,
  1721.                       and then redistribute it.  This can  be  done  either
  1722.                       with aliases for each user or by using name server MX
  1723.                       records.
  1724.  
  1725.                  3.   The firewall machine should not mount any  file  sys-
  1726.                       tems  via NFS, or make any of its file systems avail-
  1727.                       able to be mounted.
  1728.  
  1729.                  4.   Password security on the  firewall  must  be  rigidly
  1730.                       enforced.
  1731.  
  1732.                  5.   The firewall host should not trust  any  other  hosts
  1733.                       regardless  of  where  they  are.   Furthermore,  the
  1734.                       firewall should not be trusted by any other host.
  1735.  
  1736.                  6.   Anonymous FTP and other similar services should  only
  1737.                       be  provided  by  the firewall host, if they are pro-
  1738.                       vided at all.
  1739.  
  1740.                  The purpose of the firewall is to  prevent  crackers  from
  1741.             accessing other hosts on your network.  This means, in general,
  1742.             that you must maintain strict and rigidly enforced security  on
  1743.             the  firewall,  but  the  other  hosts are less vulnerable, and
  1744.             hence security may be somewhat lax.  But  it  is  important  to
  1745.             remember  that  the  firewall  is  not  a complete cure against
  1746.             crackers - if a cracker can break into the firewall machine, he
  1747.             can then try to break into any other host on your network.
  1748.  
  1749.  
  1750.           2.3   FILE SYSTEM SECURITY
  1751.  
  1752.  
  1753.  
  1754.                  The last defense against system crackers are  the  permis-
  1755.             sions  offered  by the file system.  Each file or directory has
  1756.             three sets of permission bits associated with it:  one set  for
  1757.             the  user who owns the file, one set for the users in the group
  1758.             with which the file is associated, and one set  for  all  other
  1759.             users  (the  ``world''  permissions).   Each set contains three
  1760.             identical permission bits, which control the following:
  1761.  
  1762.                  _r_e_a_d     If set, the file or directory may  be  read.   In
  1763.                           the  case  of  a  directory, read access allows a
  1764.                           user to see the  contents  of  a  directory  (the
  1765.  
  1766.  
  1767.  
  1768.                                          24
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.                           names of the files contained therein), but not to
  1780.                           access them.
  1781.  
  1782.                  _w_r_i_t_e    If set, the file  or  directory  may  be  written
  1783.                           (modified).   In  the  case of a directory, write
  1784.                           permission implies the ability to create, delete,
  1785.                           and  rename  files.   Note  that  the  ability to
  1786.                           remove a file is _n_o_t controlled  by  the  permis-
  1787.                           sions  on the file, but rather the permissions on
  1788.                           the directory containing the file.
  1789.  
  1790.                  _e_x_e_c_u_t_e  If set, the file or  directory  may  be  executed
  1791.                           (searched).   In the case of a directory, execute
  1792.                           permission implies the ability  to  access  files
  1793.                           contained in that directory.
  1794.  
  1795.                  In addition, a fourth permission bit is available in  each
  1796.             set  of  permissions.  This bit has a different meaning in each
  1797.             set of permission bits:
  1798.  
  1799.                  _s_e_t_u_i_d  If set in the owner permissions, this bit controls
  1800.                          the  ``set  user  id''  (setuid) status of a file.
  1801.                          Setuid status means that when a  program  is  exe-
  1802.                          cuted,  it  executes  with  the permissions of the
  1803.                          user owning the program, in addition to  the  per-
  1804.                          missions  of  the user executing the program.  For
  1805.                          example, _s_e_n_d_m_a_i_l is setuid ``root,'' allowing  it
  1806.                          to  write files in the mail queue area, which nor-
  1807.                          mal users are not allowed  to  do.   This  bit  is
  1808.                          meaningless on nonexecutable files.
  1809.  
  1810.                  _s_e_t_g_i_d  If set in the group permissions, this bit controls
  1811.                          the  ``set  group  id'' (setgid) status of a file.
  1812.                          This behaves in exactly the same way as the setuid
  1813.                          bit, except that the group id is affected instead.
  1814.                          This bit is meaningless  on  non-executable  files
  1815.                          (but see below).
  1816.  
  1817.                  _s_t_i_c_k_y  If set in the world  permissions,  the  ``sticky''
  1818.                          bit  tells  the  operating  system  to  do special
  1819.                          things with the text image of an executable  file.
  1820.                          It  is  mostly  a  holdover from older versions of
  1821.                          UNIX, and has little if any use today.   This  bit
  1822.                          is  also  meaningless  on nonexecutable files (but
  1823.                          see below).
  1824.  
  1825.  
  1826.           2.3.1   Setuid Shell Scripts
  1827.  
  1828.  
  1829.  
  1830.                Shell scripts that have the setuid or  setgid  bits  set  on
  1831.  
  1832.  
  1833.  
  1834.                                          25
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.           them  are _n_o_t secure, regardless of how many safeguards are taken
  1846.           when writing them.  There are numerous software  packages  avail-
  1847.           able  that  claim  to  make  shell  scripts secure, but every one
  1848.           released so far has not managed to solve all the problems.
  1849.  
  1850.                Setuid and setgid shell scripts should never be  allowed  on
  1851.           any UNIX system.
  1852.  
  1853.  
  1854.           2.3.2   The Sticky Bit on Directories
  1855.  
  1856.  
  1857.  
  1858.                Newer versions of UNIX have attached a new  meaning  to  the
  1859.           sticky  bit.   When this bit is set on a directory, it means that
  1860.           users may not delete or rename other users' files in this  direc-
  1861.           tory.   This  is  typically  useful for the /_t_m_p directory.  Nor-
  1862.           mally, /_t_m_p  is  world-writable,  enabling  any  user  to  delete
  1863.           another  user's  files.  By setting the sticky bit on /_t_m_p, users
  1864.           may only delete their own files from this directory.
  1865.  
  1866.                To set the sticky bit on a directory, use the command
  1867.  
  1868.                   # chmod o+t _d_i_r_e_c_t_o_r_y
  1869.  
  1870.  
  1871.  
  1872.           2.3.3   The Setgid Bit on Directories
  1873.  
  1874.  
  1875.  
  1876.                In SunOS 4.0, the setgid bit was also given a  new  meaning.
  1877.           Two  rules can be used for assigning group ownership to a file in
  1878.           SunOS:
  1879.  
  1880.                1.   The System V mechanism, which says that a  user's  pri-
  1881.                     mary  group id (the one listed in the password file) is
  1882.                     assigned to any file he creates.
  1883.  
  1884.                2.   The Berkeley mechanism, which says that the group id of
  1885.                     a file is set to the group id of the directory in which
  1886.                     it is created.
  1887.  
  1888.                If the setgid bit  is  set  on  a  directory,  the  Berkeley
  1889.           mechanism  is  enabled.   Otherwise,  the  System  V mechanism is
  1890.           enabled.  Normally, the Berkeley mechanism is used; this  mechan-
  1891.           ism must be used if creating directories for use by more than one
  1892.           member of a group (see Section 2.1.5).
  1893.  
  1894.                To set the setgid bit on a directory, use the command
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.                                          26
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.                   # chmod g+s _d_i_r_e_c_t_o_r_y
  1912.  
  1913.  
  1914.  
  1915.           2.3.4   The umask Value
  1916.  
  1917.  
  1918.  
  1919.                When a file is created by a program, say a text editor or  a
  1920.           compiler,  it  is typically created with all permissions enabled.
  1921.           Since this is rarely desirable (you don't want other users to  be
  1922.           able  to write your files), the _u_m_a_s_k value is used to modify the
  1923.           set of permissions a file is created with.  Simply put, while the
  1924.           _c_h_m_o_d  command  [Sun88a,  65-66]  specifies  what  bits should be
  1925.           turned _o_n, the umask value specifies what bits should  be  turned
  1926.           _o_f_f.
  1927.  
  1928.                For example, the default umask on most systems is 022.  This
  1929.           means  that  write  permission  for the group and world should be
  1930.           turned off whenever a file is created.  If instead you wanted  to
  1931.           turn  off all group and world permission bits, such that any file
  1932.           you created would not be readable,  writable,  or  executable  by
  1933.           anyone except yourself, you would set your umask to 077.
  1934.  
  1935.                The umask value is specified in the ._c_s_h_r_c or ._p_r_o_f_i_l_e files
  1936.           read  by  the  shell  using the _u_m_a_s_k command [Sun88a, 108, 459].
  1937.           The ``root'' account should have the line
  1938.  
  1939.                   umask 022
  1940.  
  1941.           in its /._c_s_h_r_c file, in order to prevent the accidental  creation
  1942.           of world-writable files owned by the super-user.
  1943.  
  1944.  
  1945.           2.3.5   Encrypting Files
  1946.  
  1947.  
  1948.  
  1949.                The standard UNIX _c_r_y_p_t command [Sun88a, 95] is not  at  all
  1950.           secure.  Although it is reasonable to expect that _c_r_y_p_t will keep
  1951.           the casual ``browser'' from reading a file, it will present noth-
  1952.           ing  more  than  a  minor  inconvenience to a determined cracker.
  1953.           _C_r_y_p_t implements a one-rotor machine along the lines of the  Ger-
  1954.           man  Enigma  (broken  in World War II).  The methods of attack on
  1955.           such a machine are well known, and a sufficiently large file  can
  1956.           usually  be  decrypted  in  a few hours even without knowledge of
  1957.           what the file contains [Reed84].   In  fact,  publicly  available
  1958.           packages  of  programs designed to ``break'' files encrypted with
  1959.           _c_r_y_p_t have been around for several years.
  1960.  
  1961.                There are software implementations of another algorithm, the
  1962.           Data  Encryption  Standard  (DES),  available  on  some  systems.
  1963.  
  1964.  
  1965.  
  1966.                                          27
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.           Although this algorithm is much more secure than  _c_r_y_p_t,  it  has
  1978.           never  been  proven  that  it  is totally secure, and many doubts
  1979.           about its security have been raised in recent years.
  1980.  
  1981.                Perhaps the best thing to say about encrypting  files  on  a
  1982.           computer system is this:  if you think you have a file whose con-
  1983.           tents are important enough to encrypt, then that file should  not
  1984.           be stored on the computer in the first place.  This is especially
  1985.           true of systems with limited security, such as UNIX  systems  and
  1986.           personal computers.
  1987.  
  1988.                It  is  important  to  note  that  UNIX  passwords  are  _n_o_t
  1989.           encrypted  with  the  _c_r_y_p_t program.  Instead, they are encrypted
  1990.           with a modified version of the DES that generates one-way encryp-
  1991.           tions  (that is, the password cannot be decrypted).  When you log
  1992.           in, the system does  not  decrypt  your  password.   Instead,  it
  1993.           encrypts  your  attempted  password, and if this comes out to the
  1994.           same result as encrypting your real password, you are allowed  to
  1995.           log in.
  1996.  
  1997.  
  1998.           2.3.6   Devices
  1999.  
  2000.  
  2001.  
  2002.                The security of devices is an important issue in UNIX.  Dev-
  2003.           ice files (usually residing in /_d_e_v) are used by various programs
  2004.           to access the data on the disk drives or  in  memory.   If  these
  2005.           device files are not properly protected, your system is wide open
  2006.           to a cracker.  The entire list of devices is too long to go  into
  2007.           here, since it varies widely from system to system.  However, the
  2008.           following guidelines apply to all systems:
  2009.  
  2010.                1.   The files /_d_e_v/_k_m_e_m,  /_d_e_v/_m_e_m,  and  /_d_e_v/_d_r_u_m  should
  2011.                     never  be  readable  by the world.  If your system sup-
  2012.                     ports the notion of the ``kmem'' group (most newer sys-
  2013.                     tems  do) and utilities such as _p_s are setgid ``kmem,''
  2014.                     then these files should be owned by user  ``root''  and
  2015.                     group ``kmem,'' and should be mode 640.  If your system
  2016.                     does not support the notion of the ``kmem'' group,  and
  2017.                     utilities  such  as  _p_s are setuid ``root,'' then these
  2018.                     files should be owned by user ``root'' and mode 600.
  2019.  
  2020.                2.   The disk devices, such as /_d_e_v/_s_d_0_a, /_d_e_v/_r_x_y_1_b,  etc.,
  2021.                     should  be  owned  by  user ``root'' and group ``opera-
  2022.                     tor,'' and should be mode 640.  Note that each disk has
  2023.                     eight  partitions  and two device files for each parti-
  2024.                     tion.  Thus, the disk ``sd0'' would have the  following
  2025.                     device files associated with it in /_d_e_v:
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.                                          28
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.                             sd0a     sd0e     rsd0a     rsd0e
  2044.                             sd0b     sd0f     rsd0b     rsd0f
  2045.                             sd0c     sd0g     rsd0c     rsd0g
  2046.                             sd0d     sd0h     rsd0d     rsd0h
  2047.  
  2048.  
  2049.                3.   With very few exceptions, all other devices  should  be
  2050.                     owned  by  user  ``root.''  One exception is terminals,
  2051.                     which are changed to be owned  by  the  user  currently
  2052.                     logged  in on them.  When the user logs out, the owner-
  2053.                     ship of the terminal is automatically changed  back  to
  2054.                     ``root.''
  2055.  
  2056.  
  2057.           2.4   SECURITY IS YOUR RESPONSIBILITY
  2058.  
  2059.  
  2060.  
  2061.                This section has detailed numerous tools for improving secu-
  2062.           rity  provided  by the UNIX operating system.  The most important
  2063.           thing to note about these tools is that although they are  avail-
  2064.           able,  they  are  typically not put to use in most installations.
  2065.           Therefore, it is incumbent on you, the system  administrator,  to
  2066.           take the time and make the effort to enable these tools, and thus
  2067.           to protect your system from unauthorized access.
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.                                          29
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.                                          30
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.                                       SECTION 3
  2177.  
  2178.                                  MONITORING SECURITY
  2179.  
  2180.  
  2181.  
  2182.                One of the most important tasks in keeping any computer sys-
  2183.           tem  secure  is  monitoring  the  security  of  the system.  This
  2184.           involves examining system log files for unauthorized accesses  of
  2185.           the  system, as well as monitoring the system itself for security
  2186.           holes.  This section describes the procedures for doing this.  An
  2187.           additional  part  of monitoring security involves keeping abreast
  2188.           of security problems found by others; this is described  in  Sec-
  2189.           tion 5.
  2190.  
  2191.  
  2192.           3.1   ACCOUNT SECURITY
  2193.  
  2194.  
  2195.  
  2196.                Account security should be monitored periodically  in  order
  2197.           to  check for two things: users logged in when they ``shouldn't''
  2198.           be (e.g., late at night, when they're  on  vacation,  etc.),  and
  2199.           users  executing  commands  they wouldn't normally be expected to
  2200.           use.  The commands described in  this  section  can  be  used  to
  2201.           obtain this information from the system.
  2202.  
  2203.  
  2204.           3.1.1   The lastlog File
  2205.  
  2206.  
  2207.  
  2208.                The file /_u_s_r/_a_d_m/_l_a_s_t_l_o_g [Sun88a, 1485]  records  the  most
  2209.           recent  login  time  for  each  user  of the system.  The message
  2210.           printed each time you log in, e.g.,
  2211.  
  2212.                   Last login: Sat Mar 10 10:50:48 from spam.itstd.sri.c
  2213.  
  2214.           uses the time stored in the _l_a_s_t_l_o_g file.  Additionally, the last
  2215.           login  time reported by the _f_i_n_g_e_r command uses this time.  Users
  2216.           should be told to carefully examine this time whenever  they  log
  2217.           in,  and  to report unusual login times to the system administra-
  2218.           tor.  This is an easy way to detect account break-ins, since each
  2219.           user should remember the last time she logged into the system.
  2220.  
  2221.  
  2222.           3.1.2   The utmp and wtmp Files
  2223.  
  2224.  
  2225.  
  2226.                The file /_e_t_c/_u_t_m_p [Sun88a, 1485] is used to record  who  is
  2227.  
  2228.  
  2229.  
  2230.                                          31
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.           currently  logged  into  the  system.  This file can be displayed
  2242.           using the _w_h_o command [Sun88a, 597]:
  2243.  
  2244.                   % who
  2245.                   hendra   tty0c   Mar 13 12:31
  2246.                   heidari  tty14   Mar 13 13:54
  2247.                   welgem   tty36   Mar 13 12:15
  2248.                   reagin   ttyp0   Mar 13 08:54   (aaifs.itstd.sri.)
  2249.                   ghg      ttyp1   Mar  9 07:03   (hydra.riacs.edu)
  2250.                   compion  ttyp2   Mar  1 03:01   (ei.ecn.purdue.ed)
  2251.  
  2252.           For each user, the login name, terminal being used,  login  time,
  2253.           and  remote  host  (if the user is logged in via the network) are
  2254.           displayed.
  2255.  
  2256.                The file /_u_s_r/_a_d_m/_w_t_m_p [Sun88a, 1485] records each login and
  2257.           logout  time  for  every  user.   This file can also be displayed
  2258.           using the _w_h_o command:
  2259.  
  2260.                   % who /usr/adm/wtmp
  2261.                   davy     ttyp4    Jan  7 12:42 (annex01.riacs.ed)
  2262.                            ttyp4    Jan  7 15:33
  2263.                   davy     ttyp4    Jan  7 15:33 (annex01.riacs.ed)
  2264.                            ttyp4    Jan  7 15:35
  2265.                   hyder    ttyp3    Jan  8 09:07 (triceratops.itst)
  2266.                            ttyp3    Jan  8 11:43
  2267.  
  2268.           A line that contains a login name indicates  the  time  the  user
  2269.           logged  in; a line with no login name indicates the time that the
  2270.           terminal was logged off.  Unfortunately,  the  output  from  this
  2271.           command  is  rarely as simple as in the example above; if several
  2272.           users log in at once, the login and logout times  are  all  mixed
  2273.           together and must be matched up by hand using the terminal name.
  2274.  
  2275.                The _w_t_m_p file may also be examined using  the  _l_a_s_t  command
  2276.           [Sun88a,  248].   This command sorts out the entries in the file,
  2277.           matching up login and logout  times.   With  no  arguments,  _l_a_s_t
  2278.           displays  all  information  in the file.  By giving the name of a
  2279.           user or terminal, the output can be restricted to the information
  2280.           about  the  user or terminal in question.  Sample output from the
  2281.           _l_a_s_t command is shown below.
  2282.  
  2283.           % last
  2284.           davy      ttyp3  intrepid.itstd.s Tue Mar 13 10:55 - 10:56 (00:00)
  2285.           hyder     ttyp3  clyde.itstd.sri. Mon Mar 12 15:31 - 15:36 (00:04)
  2286.           reboot    ~                       Mon Mar 12 15:16
  2287.           shutdown  ~                       Mon Mar 12 15:16
  2288.           arms      ttyp3  clyde0.itstd.sri Mon Mar 12 15:08 - 15:12 (00:04)
  2289.           hyder     ttyp3  spam.itstd.sri.c Sun Mar 11 21:08 - 21:13 (00:04)
  2290.           reboot    ~                       Sat Mar 10 20:05
  2291.           davy      ftp    hydra.riacs.edu  Sat Mar 10 13:23 - 13:30 (00:07)
  2292.  
  2293.  
  2294.  
  2295.  
  2296.                                          32
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.           For each login session, the user name, terminal used, remote host
  2308.           (if  the user logged in via the network), login and logout times,
  2309.           and session duration are shown.  Additionally, the times  of  all
  2310.           system  shutdowns  and  reboots  (generated  by  the _s_h_u_t_d_o_w_n and
  2311.           _r_e_b_o_o_t commands  [Sun88a,  1727,  1765])  are  recorded.   Unfor-
  2312.           tunately,  system crashes are not recorded.  In newer versions of
  2313.           the operating system, pseudo logins such as  those  via  the  _f_t_p
  2314.           command  are  also  recorded;  an example of this is shown in the
  2315.           last line of the sample output, above.
  2316.  
  2317.  
  2318.           3.1.3   The acct File
  2319.  
  2320.  
  2321.  
  2322.                The file /_u_s_r/_a_d_m/_a_c_c_t [Sun88a, 1344-1345] records each exe-
  2323.           cution of a command on the system, who executed it, when, and how
  2324.           long it took.  This information is logged  each  time  a  command
  2325.           completes,  but only if your kernel was compiled with the SYSACCT
  2326.           option enabled (the option is enabled in  some  GENERIC  kernels,
  2327.           but is usually disabled by default).
  2328.  
  2329.                The _a_c_c_t file can be displayed using  the  _l_a_s_t_c_o_m_m  command
  2330.           [Sun88a,  249].   With  no  arguments, all the information in the
  2331.           file is displayed.  However, by giving a command name, user name,
  2332.           or  terminal name as an argument, the output can be restricted to
  2333.           information about the given command, user, or  terminal.   Sample
  2334.           output from _l_a_s_t_c_o_m_m is shown below.
  2335.  
  2336.           % lastcomm
  2337.           sh         S     root     __         0.67 secs Tue Mar 13 12:45
  2338.           atrun            root     __         0.23 secs Tue Mar 13 12:45
  2339.           lpd         F    root     __         1.06 secs Tue Mar 13 12:44
  2340.           lpr        S     burwell  tty09      1.23 secs Tue Mar 13 12:44
  2341.           troff            burwell  tty09     12.83 secs Tue Mar 13 12:44
  2342.           eqn              burwell  tty09      1.44 secs Tue Mar 13 12:44
  2343.           df               kindred  ttyq7      0.78 secs Tue Mar 13 12:44
  2344.           ls               kindred  ttyq7      0.28 secs Tue Mar 13 12:44
  2345.           cat              kindred  ttyq7      0.05 secs Tue Mar 13 12:44
  2346.           stty             kindred  ttyq7      0.05 secs Tue Mar 13 12:44
  2347.           tbl              burwell  tty09      1.08 secs Tue Mar 13 12:44
  2348.           rlogin     S     jones    ttyp3      5.66 secs Tue Mar 13 12:38
  2349.           rlogin      F    jones    ttyp3      2.53 secs Tue Mar 13 12:41
  2350.           stty             kindred  ttyq7      0.05 secs Tue Mar 13 12:44
  2351.  
  2352.           The first column indicates the name of  the  command.   The  next
  2353.           column displays certain flags on the command:  an ``F'' means the
  2354.           process spawned a child process, ``S'' means the process ran with
  2355.           the  set-user-id  bit  set, ``D'' means the process exited with a
  2356.           core dump, and ``X'' means the  process  was  killed  abnormally.
  2357.           The  remaining  columns  show  the  name  of the user who ran the
  2358.           program, the terminal he ran it from (if applicable), the  amount
  2359.  
  2360.  
  2361.  
  2362.                                          33
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.           of  CPU  time  used by the command (in seconds), and the date and
  2374.           time the process started.
  2375.  
  2376.  
  2377.           3.2   NETWORK SECURITY
  2378.  
  2379.  
  2380.  
  2381.                Monitoring network security is more difficult, because there
  2382.           are  so many ways for a cracker to attempt to break in.  However,
  2383.           there are some programs available to aid you in this task.  These
  2384.           are described in this section.
  2385.  
  2386.  
  2387.           3.2.1   The syslog Facility
  2388.  
  2389.  
  2390.  
  2391.                The _s_y_s_l_o_g facility  [Sun88a,  1773]  is  a  mechanism  that
  2392.           enables  any command to log error messages and informational mes-
  2393.           sages to the system console, as well as to  a  log  file.   Typi-
  2394.           cally,  error  messages  are logged in the file /_u_s_r/_a_d_m/_m_e_s_s_a_g_e_s
  2395.           along with the date, time, name of the program sending  the  mes-
  2396.           sage, and (usually) the process id of the program.  A sample seg-
  2397.           ment of the _m_e_s_s_a_g_e_s file is shown below.
  2398.  
  2399.           Mar 12 14:53:37 sparkyfs login: ROOT LOGIN ttyp3 FROM setekfs.itstd.sr
  2400.           Mar 12 15:18:08 sparkyfs login: ROOT LOGIN ttyp3 FROM setekfs.itstd.sr
  2401.           Mar 12 16:50:25 sparkyfs login: ROOT LOGIN ttyp4 FROM pongfs.itstd.sri
  2402.           Mar 12 16:52:20 sparkyfs vmunix: sd2c:  read failed, no retries
  2403.           Mar 13 06:01:18 sparkyfs vmunix: /: file system full
  2404.           Mar 13 08:02:03 sparkyfs login: ROOT LOGIN ttyp4 FROM triceratops.itst
  2405.           Mar 13 08:28:52 sparkyfs su: davy on /dev/ttyp3
  2406.           Mar 13 08:38:03 sparkyfs login: ROOT LOGIN ttyp4 FROM triceratops.itst
  2407.           Mar 13 10:56:54 sparkyfs automount[154]: host aaifs not responding
  2408.           Mar 13 11:30:42 sparkyfs login: REPEATED LOGIN FAILURES ON ttyp3 FROM
  2409.                           intrepid.itstd.s, daemon
  2410.  
  2411.           Of particular interest in this sample are the messages  from  the
  2412.           _l_o_g_i_n  and  _s_u  programs.   Whenever someone logs in as ``root,''
  2413.           _l_o_g_i_n logs this information.  Generally, logging in  as  ``root''
  2414.           directly,   rather   than   using   the  _s_u  command,  should  be
  2415.           discouraged, as it is hard to  track  which  person  is  actually
  2416.           using  the  account.   Once  this  ability  has been disabled, as
  2417.           described  in  Section  2.2.2,  detecting  a  security  violation
  2418.           becomes  a simple matter of searching the _m_e_s_s_a_g_e_s file for lines
  2419.           of this type.
  2420.  
  2421.                _L_o_g_i_n also logs any case of someone repeatedly trying to log
  2422.           in  to  an account and failing.  After three attempts, _l_o_g_i_n will
  2423.           refuse to let  the  person  try  anymore.   Searching  for  these
  2424.           messages  in  the  _m_e_s_s_a_g_e_s  file  can  alert  you  to  a cracker
  2425.  
  2426.  
  2427.  
  2428.                                          34
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.           attempting to guess someone's password.
  2440.  
  2441.                Finally, when someone uses the _s_u command, either to  become
  2442.           ``root'' or someone  else, _s_u logs the success or failure of this
  2443.           operation.  These messages can be used to check for users sharing
  2444.           their  passwords, as well as for a cracker who has penetrated one
  2445.           account and is trying to penetrate others.
  2446.  
  2447.  
  2448.           3.2.2   The showmount Command
  2449.  
  2450.  
  2451.  
  2452.                The _s_h_o_w_m_o_u_n_t command [Sun88a, 1764] can be used on  an  NFS
  2453.           file server to display the names of all hosts that currently have
  2454.           something mounted from the server.  With no options, the  program
  2455.           simply  displays  a  list  of  all the hosts.  With the -_a and -_d
  2456.           options, the output is somewhat more useful.  The  first  option,
  2457.           -_a,  causes _s_h_o_w_m_o_u_n_t to list all the host and directory combina-
  2458.           tions.  For example,
  2459.  
  2460.                   bronto.itstd.sri.com:/usr/share
  2461.                   bronto.itstd.sri.com:/usr/local.new
  2462.                   bronto.itstd.sri.com:/usr/share/lib
  2463.                   bronto.itstd.sri.com:/var/spool/mail
  2464.                   cascades.itstd.sri.com:/sparky/a
  2465.                   clyde.itstd.sri.com:/laser_dumps
  2466.                   cm1.itstd.sri.com:/sparky/a
  2467.                   coco0.itstd.sri.com:/sparky/a
  2468.  
  2469.           There will be one line of output for each directory mounted by  a
  2470.           host.   With  the  -_d  option,  _s_h_o_w_m_o_u_n_t  displays a list of all
  2471.           directories that are presently mounted by some host.
  2472.  
  2473.                The output from _s_h_o_w_m_o_u_n_t should be checked for two  things.
  2474.           First,  only  machines  local  to your organization should appear
  2475.           there.  If you have set up proper netgroups as described in  Sec-
  2476.           tion  2.2.3,  this  should not be a problem.  Second, only ``nor-
  2477.           mal'' directories should be mounted.  If you find unusual  direc-
  2478.           tories  being  mounted,  you should find out who is mounting them
  2479.           and why - although it is probably innocent, it may indicate some-
  2480.           one trying to get around your security mechanisms.
  2481.  
  2482.  
  2483.           3.3   FILE SYSTEM SECURITY
  2484.  
  2485.  
  2486.  
  2487.                Checking for security holes in the file  system  is  another
  2488.           important part of making your system secure.  Primarily, you need
  2489.           to check for files that can be modified  by  unauthorized  users,
  2490.           files  that  can  inadvertently grant users too many permissions,
  2491.  
  2492.  
  2493.  
  2494.                                          35
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.           and files that can inadvertently grant access to crackers.  It is
  2506.           also important to be able to detect unauthorized modifications to
  2507.           the file system, and to recover  from  these  modifications  when
  2508.           they are made.
  2509.  
  2510.  
  2511.           3.3.1   The find Command
  2512.  
  2513.  
  2514.  
  2515.                The _f_i_n_d command [Sun88a, 183-185] is a general-purpose com-
  2516.           mand  for  searching  the  file system.  Using various arguments,
  2517.           complex matching patterns based on a  file's  name,  type,  mode,
  2518.           owner,  modification time, and other characteristics, can be con-
  2519.           structed.  The names of files that are found using these patterns
  2520.           can then be printed out, or given as arguments to other UNIX com-
  2521.           mands.  The general format of a _f_i_n_d command is
  2522.  
  2523.                   % find _d_i_r_e_c_t_o_r_i_e_s _o_p_t_i_o_n_s
  2524.  
  2525.           where _d_i_r_e_c_t_o_r_i_e_s is a list of directory names to  search  (e.g.,
  2526.           /_u_s_r),  and _o_p_t_i_o_n_s contains the options to control what is being
  2527.           searched for.  In general, for the examples in this section,  you
  2528.           will  always want to search from the root of the file system (/),
  2529.           in order to find all files matching the patterns presented.
  2530.  
  2531.                This section describes how to use _f_i_n_d to  search  for  four
  2532.           possible security problems that were described in Section 2.
  2533.  
  2534.  
  2535.           3.3.1.1   Finding Setuid and Setgid Files
  2536.  
  2537.  
  2538.  
  2539.                It is important to check the system often  for  unauthorized
  2540.           setuid and setgid programs.  Because these programs grant special
  2541.           privileges to the user who is executing them, it is necessary  to
  2542.           ensure that insecure programs are not installed.  Setuid ``root''
  2543.           programs should be closely guarded - a  favorite  trick  of  many
  2544.           crackers  is to break into ``root'' once, and leave a setuid pro-
  2545.           gram hidden somewhere that will enable them to regain  super-user
  2546.           powers even if the original hole is plugged.
  2547.  
  2548.                The command to search for setuid and setgid files is
  2549.  
  2550.                   # find / -type f -a \( -perm -4000 -o -perm -2000 \) -print
  2551.  
  2552.           The options to this command have the following meanings:
  2553.  
  2554.                /    The name of the directory  to  be  searched.   In  this
  2555.                     case,  we  want to search the entire file system, so we
  2556.                     specify /.  You might instead restrict  the  search  to
  2557.  
  2558.  
  2559.  
  2560.                                          36
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.                     /_u_s_r or /_h_o_m_e.
  2572.  
  2573.                -type f
  2574.                     Only examine files whose type is ``f,''  regular  file.
  2575.                     Other  options  include  ``d'' for directory, ``l'' for
  2576.                     symbolic link, ``c'' for character-special devices, and
  2577.                     ``b'' for block-special devices.
  2578.  
  2579.                -a   This specifies ``and.''  Thus, we want  to  know  about
  2580.                     files whose type is ``regular file,'' _a_n_d whose permis-
  2581.                     sions bits match the other part of this expression.
  2582.  
  2583.                \( -perm -4000 -o -perm -2000 \)
  2584.                     The parentheses in this part of the  command  are  used
  2585.                     for  grouping.   Thus,  everything  in this part of the
  2586.                     command matches a single pattern, and is treated as the
  2587.                     other half of the ``and'' clause described above.
  2588.  
  2589.                     -perm -4000
  2590.                          This specifies a match if the ``4000'' bit (speci-
  2591.                          fied as an octal number) is set in the file's per-
  2592.                          mission modes.  This is the set-user-id bit.
  2593.  
  2594.                     -o   This specifies ``or.''  Thus, we want to match  if
  2595.                          the  file  has  the  set-user-id  bit  _o_r the set-
  2596.                          group-id bit set.
  2597.  
  2598.                     -perm -2000
  2599.                          This specifies a match if the ``2000'' bit (speci-
  2600.                          fied as an octal number) is set in the file's per-
  2601.                          mission modes.  This is the set-group-id bit.
  2602.  
  2603.                -printThis indicates that for  any  file  that  matches  the
  2604.                     specified  expression  (is  a  regular file _a_n_d has the
  2605.                     setuid _o_r setgid bits set in  its  permissions),  print
  2606.                     its name on the screen.
  2607.  
  2608.                After executing this command (depending  on  how  much  disk
  2609.           space  you have, it can take anywhere from 15 minutes to a couple
  2610.           of hours to complete), you will have a list of  files  that  have
  2611.           setuid  or setgid bits set on them.  You should then examine each
  2612.           of these programs, and determine  whether  they  should  actually
  2613.           have  these  permissions.  You should be especially suspicious of
  2614.           programs that are _n_o_t in one of the directories (or  a  subdirec-
  2615.           tory) shown below.
  2616.  
  2617.                   /bin
  2618.                   /etc
  2619.                   /usr/bin
  2620.                   /usr/ucb
  2621.                   /usr/etc
  2622.  
  2623.  
  2624.  
  2625.  
  2626.                                          37
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.                One file distributed with SunOS, /_u_s_r/_e_t_c/_r_e_s_t_o_r_e,  is  dis-
  2638.           tributed  with  the  setuid  bit  set  on  it, and should not be,
  2639.           because of a security hole.  You should be  sure  to  remove  the
  2640.           setuid bit from this program by executing the command
  2641.  
  2642.                   # chmod u-s /usr/etc/restore
  2643.  
  2644.  
  2645.  
  2646.           3.3.1.2   Finding World-Writable Files
  2647.  
  2648.  
  2649.  
  2650.                World-writable files, particularly system files,  can  be  a
  2651.           security  hole if a cracker gains access to your system and modi-
  2652.           fies  them.    Additionally,   world-writable   directories   are
  2653.           dangerous,  since  they allow a cracker to add or delete files as
  2654.           he wishes.  The _f_i_n_d command to find all world-writable files is
  2655.  
  2656.                   # find / -perm -2 -print
  2657.  
  2658.           In this case, we do not use the  -_t_y_p_e  option  to  restrict  the
  2659.           search,  since  we  are  interested in directories and devices as
  2660.           well as files.  The -_2 specifies the world write bit (in octal).
  2661.  
  2662.                This list of files will be fairly  long,  and  will  include
  2663.           some files that _s_h_o_u_l_d be world writable.  You should not be con-
  2664.           cerned if terminal devices  in  /_d_e_v  are  world  writable.   You
  2665.           should  also  not be concerned about line printer error log files
  2666.           being world writable.  Finally, symbolic links may be world writ-
  2667.           able  -  the permissions on a symbolic link, although they exist,
  2668.           have no meaning.
  2669.  
  2670.  
  2671.           3.3.1.3   Finding Unowned Files
  2672.  
  2673.  
  2674.  
  2675.                Finding files that are owned by nonexistent users can  often
  2676.           be  a clue that a cracker has gained access to your system.  Even
  2677.           if this is not the case, searching for these files gives  you  an
  2678.           opportunity  to  clean  up files that should have been deleted at
  2679.           the same time the user herself was deleted.  The command to  find
  2680.           unowned files is
  2681.  
  2682.                   # find / -nouser -print
  2683.  
  2684.           The -_n_o_u_s_e_r option matches files that are owned by a user id  not
  2685.           contained   in  the  /_e_t_c/_p_a_s_s_w_d  database.   A  similar  option,
  2686.           -_n_o_g_r_o_u_p, matches files owned by nonexistent groups.  To find all
  2687.           files  owned by nonexistent users _o_r groups, you would use the -_o
  2688.           option as follows:
  2689.  
  2690.  
  2691.  
  2692.                                          38
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                   # find / -nouser -o -nogroup -print
  2705.  
  2706.  
  2707.  
  2708.           3.3.1.4   Finding .rhosts Files
  2709.  
  2710.  
  2711.  
  2712.                As mentioned in Section 2.2.1.2, users should be  prohibited
  2713.           from having ._r_h_o_s_t_s files in their accounts.  To search for this,
  2714.           it is only necessary to search the parts of the file system  that
  2715.           contain home directories (i.e., you can skip / and /_u_s_r):
  2716.  
  2717.                   # find /home -name .rhosts -print
  2718.  
  2719.           The -_n_a_m_e option indicates that the complete  name  of  any  file
  2720.           whose name matches ._r_h_o_s_t_s should be printed on the screen.
  2721.  
  2722.  
  2723.           3.3.2   Checklists
  2724.  
  2725.  
  2726.  
  2727.                Checklists can be a useful tool for discovering unauthorized
  2728.           changes  made  to  system  directories.  They aren't practical on
  2729.           file systems that contain users'  home  directories  since  these
  2730.           change  all  the time.  A checklist is a listing of all the files
  2731.           contained in a group of directories:  their sizes, owners, modif-
  2732.           ication dates, and so on.  Periodically, this information is col-
  2733.           lected and compared with the information in the master checklist.
  2734.           Files  that  do  not  match in all attributes can be suspected of
  2735.           having been changed.
  2736.  
  2737.                There are several utilities that implement checklists avail-
  2738.           able from public software sites (see Section 4).  However, a sim-
  2739.           ple utility can be constructed using only the  standard  UNIX  _l_s
  2740.           and _d_i_f_f commands.
  2741.  
  2742.                First, use the _l_s command [Sun88a, 285] to generate a master
  2743.           list.  This is best done immediately after installing the operat-
  2744.           ing system, but can be done at any time provided you're confident
  2745.           about the correctness of the files on the disk.  A sample command
  2746.           is shown below.
  2747.  
  2748.                   # ls -aslgR /bin /etc /usr > MasterChecklist
  2749.  
  2750.           The file _M_a_s_t_e_r_C_h_e_c_k_l_i_s_t now contains a complete list of all  the
  2751.           files  in  these  directories.  You will probably want to edit it
  2752.           and delete the lines for files you know will  be  changing  often
  2753.           (e.g.,   /_e_t_c/_u_t_m_p,  /_u_s_r/_a_d_m/_a_c_c_t).   The  _M_a_s_t_e_r_C_h_e_c_k_l_i_s_t  file
  2754.           should be stored somewhere safe where a cracker  is  unlikely  to
  2755.  
  2756.  
  2757.  
  2758.                                          39
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.           find  it  (since  he could otherwise just change the data in it):
  2770.           either on a different computer system, or on magnetic tape.
  2771.  
  2772.                To search for changes in the file system, run the  above  _l_s
  2773.           command  again,  saving  the  output  in  some  other  file,  say
  2774.           _C_u_r_r_e_n_t_L_i_s_t.  Now use the _d_i_f_f command [Sun88a, 150]  to  compare
  2775.           the two files:
  2776.  
  2777.                   # diff MasterChecklist CurrentList
  2778.  
  2779.           Lines that are only in the master checklist will be printed  pre-
  2780.           ceded  by  a  ``<,''  and lines that are only in the current list
  2781.           will be preceded by a ``>.''  If there is one line  for  a  file,
  2782.           preceded  by  a  ``<,'' this means that the file has been deleted
  2783.           since the master checklist was created.  If there is one line for
  2784.           a  file,  preceded  by a ``>,'' this means that the file has been
  2785.           created since the master checklist was created.  If there are two
  2786.           lines  for  a single file, one preceded by ``<'' and the other by
  2787.           ``>,'' this indicates that some attribute of the file has changed
  2788.           since the master checklist was created.
  2789.  
  2790.                By carefully  constructing  the  master  checklist,  and  by
  2791.           remembering  to update it periodically (you can replace it with a
  2792.           copy of _C_u_r_r_e_n_t_L_i_s_t, once you're sure the differences between the
  2793.           lists are harmless), you can easily monitor your system for unau-
  2794.           thorized changes.  The software packages available from the  pub-
  2795.           lic  software  distribution  sites  implement  basically the same
  2796.           scheme as the one here, but offer many more options for  control-
  2797.           ling what is examined and reported.
  2798.  
  2799.  
  2800.           3.3.3   Backups
  2801.  
  2802.  
  2803.  
  2804.                It is impossible to overemphasize the need for a good backup
  2805.           strategy.   File  system backups not only protect you in the even
  2806.           of hardware failure or accidental deletions, but they  also  pro-
  2807.           tect  you  against  unauthorized  file  system  changes made by a
  2808.           cracker.
  2809.  
  2810.                A good backup strategy will dump the entire system at  level
  2811.           zero  (a  ``full''  dump)  at  least  once  a month.  Partial (or
  2812.           ``incremental'') dumps should be done at least twice a week,  and
  2813.           ideally  they  should  be  done daily.  The _d_u_m_p command [Sun88a,
  2814.           1612-1614] is recommended over other programs  such  as  _t_a_r  and
  2815.           _c_p_i_o.   This is because only _d_u_m_p is capable of creating a backup
  2816.           that can be used to restore a disk to the exact state it  was  in
  2817.           when  it was dumped.  The other programs do not take into account
  2818.           files deleted or renamed between dumps, and do  not  handle  some
  2819.           specialized database files properly.
  2820.  
  2821.  
  2822.  
  2823.  
  2824.                                          40
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.           3.4   KNOW YOUR SYSTEM
  2836.  
  2837.  
  2838.  
  2839.                Aside from running large monitoring programs such  as  those
  2840.           described in the previous sections, simple everyday UNIX commands
  2841.           can also be useful for spotting security violations.  By  running
  2842.           these  commands often, whenever you have a free minute (for exam-
  2843.           ple, while waiting for someone to answer  the  phone),  you  will
  2844.           become  used  to  seeing  a specific pattern of output.  By being
  2845.           familiar with the processes normally running on your system,  the
  2846.           times different users typically log in, and so on, you can easily
  2847.           detect when something is out of the ordinary.
  2848.  
  2849.  
  2850.           3.4.1   The ps Command
  2851.  
  2852.  
  2853.  
  2854.                The _p_s command [Sun88a, 399-402]  displays  a  list  of  the
  2855.           processes  running  on your system.  _P_s has numerous options, too
  2856.           many to list here.  Generally, however, for the purpose of  moni-
  2857.           toring, the option string -_a_l_x_w_w is the most useful.*  On  a  Sun
  2858.           system  running  SunOS 4.0, you should expect to see at least the
  2859.           following:
  2860.  
  2861.                _s_w_a_p_p_e_r, _p_a_g_e_d_a_e_m_o_n
  2862.                     System programs that help the virtual memory system.
  2863.  
  2864.                /_s_b_i_n/_i_n_i_t
  2865.                     The _i_n_i_t process, which  is  responsible  for  numerous
  2866.                     tasks,  including bringing up login processes on termi-
  2867.                     nals.
  2868.  
  2869.                _p_o_r_t_m_a_p, _y_p_b_i_n_d, _y_p_s_e_r_v
  2870.                     Parts of the Yellow Pages system.
  2871.  
  2872.                _b_i_o_d, _n_f_s_d, _r_p_c._m_o_u_n_t_d, _r_p_c._q_u_o_t_a_d, _r_p_c._l_o_c_k_d
  2873.                     Parts of the Network File System (NFS).  If the  system
  2874.                     you  are  looking  at  is  not  a file server, the _n_f_s_d
  2875.                     processes probably won't exist.
  2876.  
  2877.                _r_a_r_p_d, _r_p_c._b_o_o_t_p_a_r_a_m_d
  2878.                     Part of the system  that  allows  diskless  clients  to
  2879.                     boot.
  2880.  
  2881.                Other commands you should expect to  see  are  _u_p_d_a_t_e  (file
  2882.           system  updater);  _g_e_t_t_y  (one  per  terminal  and  one  for  the
  2883.           _________________________
  2884.             * This  is  true  for  Berkeley-based  systems.   On  System  V
  2885.           systems, the option string -_e_l_f should be used instead.
  2886.  
  2887.  
  2888.  
  2889.  
  2890.                                          41
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.           console); _l_p_d (line printer daemon); _i_n_e_t_d (Internet daemon,  for
  2902.           starting other network servers); _s_h and _c_s_h (the Bourne shell and
  2903.           C shell, one or more per logged in user).  In addition, if  there
  2904.           are  users  logged in, you'll probably see invocations of various
  2905.           compilers, text editors, and word processing programs.
  2906.  
  2907.  
  2908.           3.4.2   The who and w Commands
  2909.  
  2910.  
  2911.  
  2912.                The _w_h_o command, as mentioned previously, displays the  list
  2913.           of  users  currently  logged  in  on the system.  By running this
  2914.           periodically, you can learn at what times during the day  various
  2915.           users  log  in.   Then,  when you see someone logged in at a dif-
  2916.           ferent time, you can investigate and make sure that it's  legiti-
  2917.           mate.
  2918.  
  2919.                The _w command [Sun88a, 588] is somewhat of a  cross  between
  2920.           _w_h_o  and  _p_s.   Not  only does it show a list of who is presently
  2921.           logged in, but it also displays how  long  they  have  been  idle
  2922.           (gone  without  typing  anything),  and  what  command  they  are
  2923.           currently running.
  2924.  
  2925.  
  2926.           3.4.3   The ls Command
  2927.  
  2928.  
  2929.  
  2930.                Simple as its function is, _l_s is actually  very  useful  for
  2931.           detecting  file system problems.  Periodically, you should use _l_s
  2932.           on the  various  system  directories,  checking  for  files  that
  2933.           shouldn't be there.  Most of the time, these files will have just
  2934.           ``landed'' somewhere by accident.  However, by  keeping  a  close
  2935.           watch on things, you will be able to detect a cracker long before
  2936.           you might have otherwise.
  2937.  
  2938.                When using _l_s to check for oddities, be sure to use  the  -_a
  2939.           option,  which  lists  files whose names begin with a period (.).
  2940.           Be particularly alert for files or directories named ``...'',  or
  2941.           ``..(space)'',  which  many  crackers  like  to use.  (Of course,
  2942.           remember that ``.'' and ``..'' are supposed to be there.)
  2943.  
  2944.  
  2945.           3.5   KEEP YOUR EYES OPEN
  2946.  
  2947.  
  2948.  
  2949.                Monitoring for security breaches is every bit  as  important
  2950.           as  preventing  them  in the first place.  Because it's virtually
  2951.           impossible to make a system totally secure, there is  always  the
  2952.           chance,  no matter how small, that a cracker will be able to gain
  2953.  
  2954.  
  2955.  
  2956.                                          42
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.           access.  Only by monitoring can this be detected and remedied.
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.                                          43
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.                                          44
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.                                       SECTION 4
  3101.  
  3102.                            SOFTWARE FOR IMPROVING SECURITY
  3103.  
  3104.  
  3105.  
  3106.                Because security is of great concern to many sites, a wealth
  3107.           of software has been developed for improving the security of UNIX
  3108.           systems.  Much of this software has been developed  at  universi-
  3109.           ties and other public institutions, and is available free for the
  3110.           asking.   This  section  describes  how  this  software  can   be
  3111.           obtained, and mentions some of the more important programs avail-
  3112.           able.
  3113.  
  3114.  
  3115.           4.1   OBTAINING FIXES AND NEW VERSIONS
  3116.  
  3117.  
  3118.  
  3119.                Several sites on the Internet maintain large repositories of
  3120.           public-domain  and  freely  distributable software, and make this
  3121.           material available for anonymous  FTP.   This  section  describes
  3122.           some of the larger repositories.
  3123.  
  3124.  
  3125.           4.1.1   Sun Fixes on UUNET
  3126.  
  3127.  
  3128.  
  3129.                Sun Microsystems has contracted  with  UUNET  Communications
  3130.           Services,  Inc.  to make fixes for bugs in Sun software available
  3131.           via anonymous FTP.  You can access these fixes by using  the  _f_t_p
  3132.           command  [Sun88a,  195-201]  to  connect  to the host _f_t_p._u_u._n_e_t.
  3133.           Then change into the directory _s_u_n-_f_i_x_e_s, and obtain a  directory
  3134.           listing, as shown in the example on the following page.
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.                                          45
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.           % ftp ftp.uu.net
  3166.           Connected to uunet.UU.NET.
  3167.           220 uunet FTP server (Version 5.93 Mar 20 11:01:52 EST 1990) ready
  3168.           Name (ftp.uu.net:davy): anonymous
  3169.           331 Guest login ok, send ident as password.
  3170.           Password:            _e_n_t_e_r _y_o_u_r _m_a_i_l _a_d_d_r_e_s_s _y_o_u_r_n_a_m_e@_y_o_u_r_h_o_s_t _h_e_r_e
  3171.           230 Guest login ok, access restrictions apply.
  3172.           ftp> cd sun-fixes
  3173.           _2_5_0 _C_W_D _c_o_m_m_a_n_d _s_u_c_c_e_s_s_f_u_l.
  3174.           _f_t_p> _d_i_r
  3175.           200 PORT command successful.
  3176.           150 Opening ASCII mode data connection for /bin/ls.
  3177.           total 2258
  3178.           -rw-r--r--  1 38       22           4558 Aug 31  1989 README
  3179.           -rw-r--r--  1 38       22         484687 Dec 14  1988 ddn.tar.Z
  3180.           -rw-r--r--  1 38       22         140124 Jan 13  1989 gated.sun3.Z
  3181.           -rwxr-xr-x  1 38       22          22646 Dec 14  1988 in.ftpd.sun3.Z
  3182.           .....
  3183.           .....
  3184.           -rw-r--r--  1 38       22          72119 Aug 31  1989 sendmail.sun3.Z
  3185.           -rwxr-xr-x  1 38       22          99147 Aug 31  1989 sendmail.sun4.Z
  3186.           -rw-r--r--  1 38       22           3673 Jul 11  1989 wall.sun3.Z
  3187.           -rw-r--r--  1 38       22           4099 Jul 11  1989 wall.sun4.Z
  3188.           -rwxr-xr-x  1 38       22           7955 Jan 18  1989 ypbind.sun3.Z
  3189.           -rwxr-xr-x  1 38       22           9237 Jan 18  1989 ypbind.sun4.Z
  3190.           226 Transfer complete.
  3191.           1694 bytes received in 0.39 seconds (4.2 Kbytes/s)
  3192.           ftp> quit
  3193.           _2_2_1 _G_o_o_d_b_y_e.
  3194.           %
  3195.  
  3196.           The file _R_E_A_D_M_E contains a brief description of what each file in
  3197.           this directory contains, and what is required to install the fix.
  3198.  
  3199.  
  3200.           4.1.2   Berkeley Fixes
  3201.  
  3202.  
  3203.  
  3204.                The University of California at Berkeley  also  makes  fixes
  3205.           available via anonymous FTP; these fixes pertain primarily to the
  3206.           current release of BSD UNIX (currently  release  4.3).   However,
  3207.           even if you are not running their software, these fixes are still
  3208.           important, since many vendors (Sun, DEC,  Sequent  ,  etc.)  base
  3209.           their software on the Berkeley releases.
  3210.  
  3211.                The Berkeley fixes are available for anonymous FTP from  the
  3212.           host  _u_c_b_a_r_p_a._b_e_r_k_e_l_e_y._e_d_u  in  the directory _4._3/_u_c_b-_f_i_x_e_s.  The
  3213.           file _I_N_D_E_X in this directory describes what each file contains.
  3214.  
  3215.                Berkeley also distributes new versions of _s_e_n_d_m_a_i_l and _n_a_m_e_d
  3216.           [Sun88a,  1758-1760,  1691-1692] from this machine.  New versions
  3217.  
  3218.  
  3219.  
  3220.                                          46
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.           of these commands are stored in the _4._3 directory, usually in the
  3232.           files _s_e_n_d_m_a_i_l._t_a_r._Z and _b_i_n_d._t_a_r._Z, respectively.
  3233.  
  3234.  
  3235.           4.1.3   Simtel-20 and UUNET
  3236.  
  3237.  
  3238.  
  3239.                The two largest general-purpose software repositories on the
  3240.           Internet are the hosts _w_s_m_r-_s_i_m_t_e_l_2_0._a_r_m_y._m_i_l and _f_t_p._u_u._n_e_t.
  3241.  
  3242.                _w_s_m_r-_s_i_m_t_e_l_2_0._a_r_m_y._m_i_l is a TOPS-20 machine operated by  the
  3243.           U.  S. Army at White Sands Missile Range, New Mexico.  The direc-
  3244.           tory _p_d_2:<_u_n_i_x-_c> contains a large amount of UNIX software,  pri-
  3245.           marily  taken  from  the  _c_o_m_p._s_o_u_r_c_e_s newsgroups.  The file _0_0_0-
  3246.           _m_a_s_t_e_r-_i_n_d_e_x._t_x_t contains a master list and description  of  each
  3247.           piece  of  software  available  in the repository.  The file _0_0_0-
  3248.           _i_n_t_r_o-_u_n_i_x-_s_w._t_x_t contains information on the mailing  list  used
  3249.           to  announce  new software, and describes the procedures used for
  3250.           transferring files from the archive with FTP.
  3251.  
  3252.                _f_t_p._u_u._n_e_t is operated  by  UUNET  Communications  Services,
  3253.           Inc.  in Falls Church, Virginia.  This company sells Internet and
  3254.           USENET access to sites all over  the  country  (and  internation-
  3255.           ally).   The software posted to the following USENET source news-
  3256.           groups is stored here, in directories of the same name:
  3257.  
  3258.                   comp.sources.games
  3259.                   comp.sources.misc
  3260.                   comp.sources.sun
  3261.                   comp.sources.unix
  3262.                   comp.sources.x
  3263.  
  3264.           Numerous other distributions, such as all the  freely  distribut-
  3265.           able  Berkeley  UNIX  source  code, Internet Request for Comments
  3266.           (RFCs), and so on are also stored on this machine.
  3267.  
  3268.  
  3269.           4.1.4   Vendors
  3270.  
  3271.  
  3272.  
  3273.                Many vendors make fixes for bugs in their software available
  3274.           electronically,  either  via  mailing lists or via anonymous FTP.
  3275.           You should contact your vendor to find out  if  they  offer  this
  3276.           service,  and  if  so, how to access it.  Some vendors that offer
  3277.           these services include  Sun  Microsystems  (see  above),  Digital
  3278.           Equipment  Corp.,  the  University of California at Berkeley (see
  3279.           above), and Apple Computer.
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.                                          47
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.           4.2   THE NPASSWD COMMAND
  3298.  
  3299.  
  3300.  
  3301.                The _n_p_a_s_s_w_d  command,  developed  by  Clyde  Hoover  at  the
  3302.           University  of  Texas  at Austin, is intended to be a replacement
  3303.           for the standard UNIX _p_a_s_s_w_d command [Sun88a, 379],  as  well  as
  3304.           the  Sun _y_p_p_a_s_s_w_d command [Sun88a, 611].  _n_p_a_s_s_w_d makes passwords
  3305.           more secure by refusing to allow users to select  insecure  pass-
  3306.           words.  The following capabilities are provided by _n_p_a_s_s_w_d:
  3307.  
  3308.                +o    Configurable minimum password length
  3309.  
  3310.                +o    Configurable to force users to use mixed case or digits
  3311.                     and punctuation
  3312.  
  3313.                +o    Checking for ``simple'' passwords such  as  a  repeated
  3314.                     letter
  3315.  
  3316.                +o    Checking against the host name and other  host-specific
  3317.                     information
  3318.  
  3319.                +o    Checking against the login name, first and last  names,
  3320.                     and so on
  3321.  
  3322.                +o    Checking for words in various  dictionaries,  including
  3323.                     the system dictionary.
  3324.  
  3325.                The _n_p_a_s_s_w_d distribution is available for anonymous FTP from
  3326.           _e_m_x._u_t_e_x_a_s._e_d_u in the directory _p_u_b/_n_p_a_s_s_w_d.
  3327.  
  3328.  
  3329.           4.3   THE COPS PACKAGE
  3330.  
  3331.  
  3332.  
  3333.  
  3334.                COPS is a  security  tool  for  system  administrators  that
  3335.           checks  for  numerous  common  security problems on UNIX systems,
  3336.           including many of the things described in this document.  COPS is
  3337.           a  collection  of shell scripts and C programs that can easily be
  3338.           run on almost any UNIX variant.  Among other  things,  it  checks
  3339.           the  following items and sends the results to the system adminis-
  3340.           trator:
  3341.  
  3342.                +o    Checks  /_d_e_v/_k_m_e_m   and   other   devices   for   world
  3343.                     read/writability.
  3344.  
  3345.                +o    Checks  special/important  files  and  directories  for
  3346.                     ``bad'' modes (world writable, etc.).
  3347.  
  3348.                +o    Checks for easily guessed passwords.
  3349.  
  3350.  
  3351.  
  3352.                                          48
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.                +o    Checks for duplicate user ids, invalid  fields  in  the
  3364.                     password file, etc.
  3365.  
  3366.                +o    Checks for duplicate group ids, invalid fields  in  the
  3367.                     group file, etc.
  3368.  
  3369.                +o    Checks all users' home directories  and  their  ._c_s_h_r_c,
  3370.                     ._l_o_g_i_n,  ._p_r_o_f_i_l_e, and ._r_h_o_s_t_s files for security prob-
  3371.                     lems.
  3372.  
  3373.                +o    Checks all  commands  in  the  /_e_t_c/_r_c  files  [Sun88a,
  3374.                     1724-1725] and _c_r_o_n files [Sun88a, 1606-1607] for world
  3375.                     writability.
  3376.  
  3377.                +o    Checks for bad ``root'' paths, NFS file system exported
  3378.                     to the world, etc.
  3379.  
  3380.                +o    Includes an expert system that checks to see if a given
  3381.                     user  (usually ``root'') can be compromised, given that
  3382.                     certain rules are true.
  3383.  
  3384.                +o    Checks for _c_h_a_n_g_e_s in the setuid status of programs  on
  3385.                     the system.
  3386.  
  3387.                The COPS package is  available  from  the  _c_o_m_p._s_o_u_r_c_e_s._u_n_i_x
  3388.           archive  on  _f_t_p._u_u._n_e_t,  and  also  from the repository on _w_s_m_r-
  3389.           _s_i_m_t_e_l_2_0._a_r_m_y._m_i_l.
  3390.  
  3391.  
  3392.           4.4   SUN C2 SECURITY FEATURES
  3393.  
  3394.  
  3395.  
  3396.                With the release of SunOS 4.0,  Sun  has  included  security
  3397.           features  that  allow  the system to operate at a higher level of
  3398.           security, patterned after the C2* classification.  These features
  3399.           can be installed as one of the options when installing the system
  3400.           from the distribution tapes.  The security features added by this
  3401.           option include
  3402.  
  3403.                +o    Audit trails that record all login  and  logout  times,
  3404.                     the  execution of administrative commands, and the exe-
  3405.                     cution of privileged (setuid) operations.
  3406.  
  3407.                +o    A more secure password file mechanism  (``shadow  pass-
  3408.                     word  file'')  that  prevents crackers from obtaining a
  3409.                     list of the encrypted passwords.
  3410.           _________________________
  3411.             * C2 is one of several security classifications defined by  the
  3412.           National  Computer Security Center, and is described in [NCSC85],
  3413.           the ``orange book.''
  3414.  
  3415.  
  3416.  
  3417.  
  3418.                                          49
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.                +o    DES encryption capability.
  3430.  
  3431.                +o    A (more) secure NFS implementation that uses public-key
  3432.                     encryption  to authenticate the users of the system and
  3433.                     the hosts on the network, to be sure  they  really  are
  3434.                     who they claim to be.
  3435.  
  3436.           These security features are described in detail in [Sun88c].
  3437.  
  3438.  
  3439.           4.5   KERBEROS
  3440.  
  3441.  
  3442.  
  3443.                Kerberos [Stei88] is an authentication system  developed  by
  3444.           the  Athena Project at the Massachusetts Institute of Technology.
  3445.           Kerberos  is  a  third-party  authentication  service,  which  is
  3446.           trusted by other network services.  When a user logs in, Kerberos
  3447.           authenticates that user (using a password), and provides the user
  3448.           with a way to prove her identity to other servers and hosts scat-
  3449.           tered around the network.
  3450.  
  3451.                This authentication is then used by programs such as  _r_l_o_g_i_n
  3452.           [Sun88a,  418-419]  to  allow  the  user to log in to other hosts
  3453.           without a password (in place of the ._r_h_o_s_t_s file).  The authenti-
  3454.           cation is also used by the mail system in order to guarantee that
  3455.           mail is delivered to the correct person, as well as to  guarantee
  3456.           that  the sender is who he claims to be.  NFS has also been modi-
  3457.           fied by M.I.T. to work with Kerberos, thereby making  the  system
  3458.           much more secure.
  3459.  
  3460.                The overall effect of installing Kerberos and  the  numerous
  3461.           other  programs  that  go  with  it is to virtually eliminate the
  3462.           ability of users to ``spoof'' the system into believing they  are
  3463.           someone   else.    Unfortunately,  installing  Kerberos  is  very
  3464.           intrusive, requiring the modification or replacement of  numerous
  3465.           standard  programs.  For this reason, a source license is usually
  3466.           necessary.  There are plans to make Kerberos a part of 4.4BSD, to
  3467.           be  released by the University of California at Berkeley sometime
  3468.           in 1990.
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.                                          50
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.                                       SECTION 5
  3497.  
  3498.                              KEEPING ABREAST OF THE BUGS
  3499.  
  3500.  
  3501.  
  3502.                One of the hardest things about keeping a system  secure  is
  3503.           finding  out  about the security holes before a cracker does.  To
  3504.           combat this, there are several sources of information you can and
  3505.           should make use of on a regular basis.
  3506.  
  3507.  
  3508.           5.1   THE COMPUTER EMERGENCY RESPONSE TEAM
  3509.  
  3510.  
  3511.  
  3512.                The Computer Emergency Response Team (CERT) was  established
  3513.           in December 1988 by the Defense Advanced Research Projects Agency
  3514.           to address computer security concerns of research  users  of  the
  3515.           Internet.   It  is operated by the Software Engineering Institute
  3516.           at Carnegie-Mellon University.  The CERT serves as a focal  point
  3517.           for  the  reporting of security violations, and the dissemination
  3518.           of security advisories to the Internet community.   In  addition,
  3519.           the  team works with vendors of various systems in order to coor-
  3520.           dinate the fixes for security problems.
  3521.  
  3522.                The CERT sends out security advisories to the  _c_e_r_t-_a_d_v_i_s_o_r_y
  3523.           mailing  list  whenever appropriate.  They also operate a 24-hour
  3524.           hotline that can be called to  report  security  problems  (e.g.,
  3525.           someone  breaking into your system), as well as to obtain current
  3526.           (and accurate) information about rumored security problems.
  3527.  
  3528.                To join the _c_e_r_t-_a_d_v_i_s_o_r_y mailing list, send  a  message  to
  3529.           _c_e_r_t@_c_e_r_t._s_e_i._c_m_u._e_d_u  and  ask  to be added to the mailing list.
  3530.           Past advisories are available for anonymous  FTP  from  the  host
  3531.           _c_e_r_t._s_e_i._c_m_u._e_d_u.  The 24-hour hotline number is (412) 268-7090.
  3532.  
  3533.  
  3534.           5.2   DDN MANAGEMENT BULLETINS
  3535.  
  3536.  
  3537.  
  3538.                The _D_D_N _M_a_n_a_g_e_m_e_n_t _B_u_l_l_e_t_i_n is distributed electronically by
  3539.           the  Defense  Data Network (DDN) Network Information Center under
  3540.           contract to the Defense Communications Agency.  It is a means  of
  3541.           communicating  official policy, procedures, and other information
  3542.           of concern to management personnel at DDN facilities.
  3543.  
  3544.                The _D_D_N _S_e_c_u_r_i_t_y _B_u_l_l_e_t_i_n is distributed  electronically  by
  3545.           the  DDN  SCC (Security Coordination Center), also under contract
  3546.           to DCA, as a means of communicating information  on  network  and
  3547.  
  3548.  
  3549.  
  3550.                                          51
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.           host  security  exposures,  fixes,  and  concerns to security and
  3562.           management personnel at DDN facilities.
  3563.  
  3564.                Anyone may join the mailing lists for these two bulletins by
  3565.           sending  a  message to _n_i_c@_n_i_c._d_d_n._m_i_l and asking to be placed on
  3566.           the mailing lists.
  3567.  
  3568.  
  3569.           5.3   SECURITY-RELATED MAILING LISTS
  3570.  
  3571.  
  3572.  
  3573.                There are several other mailing lists operated on the Inter-
  3574.           net  that  pertain  directly  or  indirectly  to various security
  3575.           issues.  Some of the more useful ones are described below.
  3576.  
  3577.  
  3578.           5.3.1   Security
  3579.  
  3580.  
  3581.  
  3582.                The UNIX Security  mailing  list  exists  to  notify  system
  3583.           administrators  of  security  problems  _b_e_f_o_r_e they become common
  3584.           knowledge, and to provide security enhancement  information.   It
  3585.           is a restricted-access list, open only to people who can be veri-
  3586.           fied as being principal systems people at a  site.   Requests  to
  3587.           join  the  list must be sent by either the site contact listed in
  3588.           the Network Information Center's  WHOIS  database,  or  from  the
  3589.           ``root''  account  on  one  of the major site machines.  You must
  3590.           include the destination address you want on the list, an  indica-
  3591.           tion  of  whether  you  want  to be on the mail reflector list or
  3592.           receive weekly digests, the electronic  mail  address  and  voice
  3593.           telephone  number  of  the  site contact if it isn't you, and the
  3594.           name, address, and telephone number of your  organization.   This
  3595.           information should be sent to _s_e_c_u_r_i_t_y-_r_e_q_u_e_s_t@_c_p_d._c_o_m.
  3596.  
  3597.  
  3598.           5.3.2   RISKS
  3599.  
  3600.  
  3601.  
  3602.                The RISKS digest is a component of the ACM Committee on Com-
  3603.           puters and Public Policy, moderated by Peter G. Neumann.  It is a
  3604.           discussion forum on risks to the public in computers and  related
  3605.           systems,  and along with discussing computer security and privacy
  3606.           issues, has discussed such subjects as the  Stark  incident,  the
  3607.           shooting  down of the Iranian airliner in the Persian Gulf (as it
  3608.           relates to the computerized weapons systems), problems in air and
  3609.           railroad  traffic  control  systems, software engineering, and so
  3610.           on.   To  join  the  mailing  list,  send  a  message  to  _r_i_s_k_s-
  3611.           _r_e_q_u_e_s_t@_c_s_l._s_r_i._c_o_m.   This  list is also available in the USENET
  3612.           newsgroup _c_o_m_p._r_i_s_k_s.
  3613.  
  3614.  
  3615.  
  3616.                                          52
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.           5.3.3   TCP-IP
  3628.  
  3629.  
  3630.  
  3631.                The TCP-IP list is intended to act as a discussion forum for
  3632.           developers  and maintainers of implementations of the TCP/IP pro-
  3633.           tocol suite.  It also discusses network-related security problems
  3634.           when  they  involve  programs providing network services, such as
  3635.           _s_e_n_d_m_a_i_l.  To join the TCP-IP list, send  a  message  to  _t_c_p-_i_p-
  3636.           _r_e_q_u_e_s_t@_n_i_c._d_d_n._m_i_l.   This  list is also available in the USENET
  3637.           newsgroup _c_o_m_p._p_r_o_t_o_c_o_l_s._t_c_p-_i_p.
  3638.  
  3639.  
  3640.           5.3.4   SUN-SPOTS, SUN-NETS, SUN-MANAGERS
  3641.  
  3642.  
  3643.  
  3644.                The SUN-SPOTS, SUN-NETS, and SUN-MANAGERS lists are all dis-
  3645.           cussion  groups  for users and administrators of systems supplied
  3646.           by Sun Microsystems.  SUN-SPOTS is a fairly  general  list,  dis-
  3647.           cussing  everything  from  hardware configurations to simple UNIX
  3648.           questions.   To  subscribe,  send   a   message   to   _s_u_n-_s_p_o_t_s-
  3649.           _r_e_q_u_e_s_t@_r_i_c_e._e_d_u.   This  list  is  also  available in the USENET
  3650.           newsgroup _c_o_m_p._s_y_s._s_u_n.
  3651.  
  3652.                SUN-NETS is a discussion list for items pertaining  to  net-
  3653.           working  on  Sun  systems.   Much of the discussion is related to
  3654.           NFS, Yellow Pages, and name servers.  To subscribe, send  a  mes-
  3655.           sage to _s_u_n-_n_e_t_s-_r_e_q_u_e_s_t@_u_m_i_a_c_s._u_m_d._e_d_u.
  3656.  
  3657.                SUN-MANAGERS is a discussion list for Sun system administra-
  3658.           tors  and  covers  all  aspects of Sun system administration.  To
  3659.           subscribe, send a message to _s_u_n-_m_a_n_a_g_e_r_s-_r_e_q_u_e_s_t@_e_e_c_s._n_w_u._e_d_u.
  3660.  
  3661.  
  3662.           5.3.5   VIRUS-L
  3663.  
  3664.  
  3665.  
  3666.                The VIRUS-L list is a forum for the discussion  of  computer
  3667.           virus  experiences, protection software, and related topics.  The
  3668.           list is open to the public, and is implemented as a mail  reflec-
  3669.           tor,  not  a  digest.  Most of the information is related to per-
  3670.           sonal computers, although some of it may be applicable to  larger
  3671.           systems.  To subscribe, send the line
  3672.  
  3673.                   SUB VIRUS-L _y_o_u_r _f_u_l_l _n_a_m_e
  3674.  
  3675.           to the address _l_i_s_t_s_e_r_v%_l_e_h_i_i_b_m_1._b_i_t_n_e_t@_m_i_t_v_m_a._m_i_t._e_d_u.
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.                                          53
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720.  
  3721.  
  3722.  
  3723.  
  3724.  
  3725.  
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.                                          54
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.                                       SECTION 6
  3761.  
  3762.                                   SUGGESTED READING
  3763.  
  3764.  
  3765.  
  3766.                This section suggests some alternate sources of  information
  3767.           pertaining to the security and administration of the UNIX operat-
  3768.           ing system.
  3769.  
  3770.           _U_N_I_X _S_y_s_t_e_m _A_d_m_i_n_i_s_t_r_a_t_i_o_n _H_a_n_d_b_o_o_k
  3771.           Evi Nemeth, Garth Snyder, Scott Seebass
  3772.           Prentice Hall, 1989, $26.95
  3773.  
  3774.                This is perhaps the best general-purpose book on UNIX system
  3775.                administration  currently on the market.  It covers Berkeley
  3776.                UNIX, SunOS, and System V.  The 26 chapters  and  17  appen-
  3777.                dices  cover numerous topics, including booting and shutting
  3778.                down the system, the file system,  configuring  the  kernel,
  3779.                adding  a  disk,  the line printer spooling system, Berkeley
  3780.                networking, _s_e_n_d_m_a_i_l, and _u_u_c_p.  Of particular interest  are
  3781.                the  chapters  on  running  as  the super-user, backups, and
  3782.                security.
  3783.  
  3784.           _U_N_I_X _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _S_e_c_u_r_i_t_y
  3785.           F. T. Grammp and R. H. Morris
  3786.           AT&T Bell Laboratories Technical Journal
  3787.           October 1984
  3788.  
  3789.                This is an excellent discussion of some of the  more  common
  3790.                security  problems in UNIX and how to avoid them, written by
  3791.                two of Bell Labs' most prominent security experts.
  3792.  
  3793.           _P_a_s_s_w_o_r_d _S_e_c_u_r_i_t_y: _A _C_a_s_e _H_i_s_t_o_r_y
  3794.           Robert Morris and Ken Thompson
  3795.           Communications of the ACM
  3796.           November 1979
  3797.  
  3798.                An excellent discussion on the problem of password security,
  3799.                and  some interesting information on how easy it is to crack
  3800.                passwords and why.  This document is  usually  reprinted  in
  3801.                most vendors' UNIX documentation.
  3802.  
  3803.           _O_n _t_h_e _S_e_c_u_r_i_t_y _o_f _U_N_I_X
  3804.           Dennis M. Ritchie
  3805.           May 1975
  3806.  
  3807.                A discussion on UNIX security from one of the original crea-
  3808.                tors  of  the system.  This document is usually reprinted in
  3809.                most vendors' UNIX documentation.
  3810.           _T_h_e _C_u_c_k_o_o'_s _E_g_g
  3811.  
  3812.  
  3813.  
  3814.                                          55
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.           Clifford Stoll
  3826.           Doubleday, 1989, $19.95
  3827.  
  3828.                An excellent story of Stoll's experiences tracking down  the
  3829.                German  crackers who were breaking into his systems and sel-
  3830.                ling the data they found to the KGB.   Written  at  a  level
  3831.                that nontechnical users can easily understand.
  3832.  
  3833.           _S_y_s_t_e_m _a_n_d _N_e_t_w_o_r_k _A_d_m_i_n_i_s_t_r_a_t_i_o_n
  3834.           Sun Microsystems
  3835.           May, 1988
  3836.  
  3837.                Part of the SunOS documentation,  this  manual  covers  most
  3838.                aspects  of  Sun  system  administration, including security
  3839.                issues.  A must for anyone operating a  Sun  system,  and  a
  3840.                pretty good reference for other UNIX systems as well.
  3841.  
  3842.           _S_e_c_u_r_i_t_y _P_r_o_b_l_e_m_s _i_n _t_h_e _T_C_P/_I_P _P_r_o_t_o_c_o_l _S_u_i_t_e
  3843.           S. M. Bellovin
  3844.           ACM Computer Communications Review
  3845.           April, 1989
  3846.  
  3847.                An interesting discussion of some of the  security  problems
  3848.                with  the  protocols  in  use on the Internet and elsewhere.
  3849.                Most of these problems are far beyond  the  capabilities  of
  3850.                the  average  cracker, but it is still important to be aware
  3851.                of them.  This article is technical in nature,  and  assumes
  3852.                familiarity with the protocols.
  3853.  
  3854.           _A _W_e_a_k_n_e_s_s _i_n _t_h_e _4._2_B_S_D _U_N_I_X _T_C_P/_I_P _S_o_f_t_w_a_r_e
  3855.           Robert T. Morris
  3856.           AT&T Bell Labs Computer Science Technical Report 117
  3857.           February, 1985
  3858.  
  3859.                An interesting article from the author of the Internet worm,
  3860.                which  describes  a  method  that  allows  remote  hosts  to
  3861.                ``spoof'' a host into believing they  are  trusted.   Again,
  3862.                this article is technical in nature, and assumes familiarity
  3863.                with the protocols.
  3864.  
  3865.           _C_o_m_p_u_t_e_r _V_i_r_u_s_e_s _a_n_d _R_e_l_a_t_e_d _T_h_r_e_a_t_s: _A _M_a_n_a_g_e_m_e_n_t _G_u_i_d_e
  3866.           John P. Wack and Lisa J. Carnahan
  3867.           National Institute of Standards and Technology
  3868.           Special Publication 500-166
  3869.  
  3870.                This document  provides  a  good  introduction  to  viruses,
  3871.                worms,  trojan horses, and so on, and explains how they work
  3872.                and how they are used to attack computer  systems.   Written
  3873.                for the nontechnical user, this is a good starting point for
  3874.                learning about these security problems.  This  document  can
  3875.                be  ordered  for  $2.50  from  the U. S. Government Printing
  3876.                Office, document number 003-003-02955-6.
  3877.  
  3878.  
  3879.  
  3880.                                          56
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.                                       SECTION 7
  3893.  
  3894.                                      CONCLUSIONS
  3895.  
  3896.  
  3897.  
  3898.                Computer security is playing an increasingly important  role
  3899.           in our lives as more and more operations become computerized, and
  3900.           as computer networks become more widespread.  In order to protect
  3901.           your  systems  from snooping and vandalism by unauthorized crack-
  3902.           ers, it is necessary to enable  the  numerous  security  features
  3903.           provided by the UNIX system.
  3904.  
  3905.                In this document, we have covered the major areas  that  can
  3906.           be made more secure:
  3907.  
  3908.                +o    Account security
  3909.  
  3910.                +o    Network security
  3911.  
  3912.                +o    File system security.
  3913.  
  3914.           Additionally, we have discussed how to monitor for security  vio-
  3915.           lations, where to obtain security-related software and bug fixes,
  3916.           and numerous mailing lists for finding out about  security  prob-
  3917.           lems that have been discovered.
  3918.  
  3919.                Many crackers are not interested in breaking  into  specific
  3920.           systems, but rather will break into any system that is vulnerable
  3921.           to the attacks they know.  Eliminating these well-known holes and
  3922.           monitoring  the  system  for other security problems will usually
  3923.           serve as adequate defense against all  but  the  most  determined
  3924.           crackers.   By using the procedures and sources described in this
  3925.           document, you _c_a_n make your system more secure.
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.                                          57
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.                                          58
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.                                      REFERENCES
  4024.  
  4025.  
  4026.  
  4027.           [Eich89]  Eichin, Mark W., and Jon A. Rochlis.   _W_i_t_h  _M_i_c_r_o_s_c_o_p_e
  4028.                     _a_n_d  _T_w_e_e_z_e_r_s:   _A_n  _A_n_a_l_y_s_i_s  _o_f _t_h_e _I_n_t_e_r_n_e_t _V_i_r_u_s _o_f
  4029.                     _N_o_v_e_m_b_e_r _1_9_8_8.  Massachusetts Institute of  Technology.
  4030.                     February 1989.
  4031.  
  4032.           [Elme88]  Elmer-DeWitt, Philip.   ``  `The  Kid  Put  Us  Out  of
  4033.                     Action.' '' _T_i_m_e, 132 (20): 76, November 14, 1988.
  4034.  
  4035.           [Gram84]  Grammp, F. T., and R. H. Morris.  ``UNIX Operating Sys-
  4036.                     tem Security.''  _A_T&_T _B_e_l_l _L_a_b_o_r_a_t_o_r_i_e_s _T_e_c_h_n_i_c_a_l _J_o_u_r_-
  4037.                     _n_a_l, 63 (8): 1649-1672, October 1984.
  4038.  
  4039.           [Hind83]  Hinden, R., J. Haverty, and A. Sheltzer.   ``The  DARPA
  4040.                     Internet:  Interconnecting  Heterogeneous Computer Net-
  4041.                     works with Gateways.''  _I_E_E_E _C_o_m_p_u_t_e_r _M_a_g_a_z_i_n_e, 16 (9):
  4042.                     33-48, September 1983.
  4043.  
  4044.           [McLe87]  McLellan, Vin.  ``NASA Hackers:  There's  More  to  the
  4045.                     Story.''  _D_i_g_i_t_a_l _R_e_v_i_e_w, November 23, 1987, p. 80.
  4046.  
  4047.           [Morr78]  Morris, Robert, and Ken Thompson.  ``Password Security:
  4048.                     A  Case History.''  _C_o_m_m_u_n_i_c_a_t_i_o_n_s _o_f _t_h_e _A_C_M, 22 (11):
  4049.                     594-597,  November  1979.   Reprinted  in  _U_N_I_X  _S_y_s_t_e_m
  4050.                     _M_a_n_a_g_e_r'_s  _M_a_n_u_a_l,  4.3 Berkeley Software Distribution.
  4051.                     University of California, Berkeley.  April 1986.
  4052.  
  4053.           [NCSC85]  National  Computer  Security  Center.   _D_e_p_a_r_t_m_e_n_t   _o_f
  4054.                     _D_e_f_e_n_s_e  _T_r_u_s_t_e_d  _C_o_m_p_u_t_e_r  _S_y_s_t_e_m _E_v_a_l_u_a_t_i_o_n _C_r_i_t_e_r_i_a,
  4055.                     Department  of  Defense   Standard   DOD   5200.28-STD,
  4056.                     December, 1985.
  4057.  
  4058.           [Quar86]  Quarterman, J. S., and J. C. Hoskins.   ``Notable  Com-
  4059.                     puter  Networks.''  _C_o_m_m_u_n_i_c_a_t_i_o_n_s _o_f _t_h_e _A_C_M, 29 (10):
  4060.                     932-971, October 1986.
  4061.  
  4062.           [Reed84]  Reeds, J. A., and P. J.  Weinberger.   ``File  Security
  4063.                     and the UNIX System Crypt Command.''  _A_T&_T _B_e_l_l _L_a_b_o_r_a_-
  4064.                     _t_o_r_i_e_s _T_e_c_h_n_i_c_a_l _J_o_u_r_n_a_l, 63  (8):  1673-1683,  October
  4065.                     1984.
  4066.  
  4067.           [Risk87]  _F_o_r_u_m _o_n _R_i_s_k_s _t_o _t_h_e _P_u_b_l_i_c _i_n _C_o_m_p_u_t_e_r_s  _a_n_d  _R_e_l_a_t_e_d
  4068.                     _S_y_s_t_e_m_s.  ACM Committee on Computers and Public Policy,
  4069.                     Peter G. Neumann, Moderator.   Internet  mailing  list.
  4070.                     Issue 5.73, December 13, 1987.
  4071.  
  4072.           [Risk88]  _F_o_r_u_m _o_n _R_i_s_k_s _t_o _t_h_e _P_u_b_l_i_c _i_n _C_o_m_p_u_t_e_r_s  _a_n_d  _R_e_l_a_t_e_d
  4073.                     _S_y_s_t_e_m_s.  ACM Committee on Computers and Public Policy,
  4074.                     Peter G. Neumann, Moderator.   Internet  mailing  list.
  4075.  
  4076.  
  4077.  
  4078.                                          59
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.                     Issue 7.85, December 1, 1988.
  4090.  
  4091.           [Risk89a] _F_o_r_u_m _o_n _R_i_s_k_s _t_o _t_h_e _P_u_b_l_i_c _i_n _C_o_m_p_u_t_e_r_s  _a_n_d  _R_e_l_a_t_e_d
  4092.                     _S_y_s_t_e_m_s.  ACM Committee on Computers and Public Policy,
  4093.                     Peter G. Neumann, Moderator.   Internet  mailing  list.
  4094.                     Issue 8.2, January 4, 1989.
  4095.  
  4096.           [Risk89b] _F_o_r_u_m _o_n _R_i_s_k_s _t_o _t_h_e _P_u_b_l_i_c _i_n _C_o_m_p_u_t_e_r_s  _a_n_d  _R_e_l_a_t_e_d
  4097.                     _S_y_s_t_e_m_s.  ACM Committee on Computers and Public Policy,
  4098.                     Peter G. Neumann, Moderator.   Internet  mailing  list.
  4099.                     Issue 8.9, January 17, 1989.
  4100.  
  4101.           [Risk90]  _F_o_r_u_m _o_n _R_i_s_k_s _t_o _t_h_e _P_u_b_l_i_c _i_n _C_o_m_p_u_t_e_r_s  _a_n_d  _R_e_l_a_t_e_d
  4102.                     _S_y_s_t_e_m_s.  ACM Committee on Computers and Public Policy,
  4103.                     Peter G. Neumann, Moderator.   Internet  mailing  list.
  4104.                     Issue 9.69, February 20, 1990.
  4105.  
  4106.           [Ritc75]  Ritchie, Dennis M.  ``On the Security of  UNIX.''   May
  4107.                     1975.   Reprinted  in _U_N_I_X _S_y_s_t_e_m _M_a_n_a_g_e_r'_s _M_a_n_u_a_l, 4.3
  4108.                     Berkeley Software Distribution.  University of Califor-
  4109.                     nia, Berkeley.  April 1986.
  4110.  
  4111.           [Schu90]  Schuman, Evan.  ``Bid to Unhook Worm.''   _U_N_I_X  _T_o_d_a_y!,
  4112.                     February 5, 1990, p. 1.
  4113.  
  4114.           [Seel88]  Seeley, Donn.  _A _T_o_u_r _o_f _t_h_e _W_o_r_m.  Department of  Com-
  4115.                     puter Science, University of Utah.  December 1988.
  4116.  
  4117.           [Spaf88]  Spafford, Eugene H.   _T_h_e  _I_n_t_e_r_n_e_t  _W_o_r_m  _P_r_o_g_r_a_m:  _A_n
  4118.                     _A_n_a_l_y_s_i_s.   Technical Report CSD-TR-823.  Department of
  4119.                     Computer Science, Purdue University.  November 1988.
  4120.  
  4121.           [Stee88]  Steele, Guy L. Jr., Donald R. Woods, Raphael A. Finkel,
  4122.                     Mark  R.  Crispin, Richard M. Stallman, and Geoffrey S.
  4123.                     Goodfellow.  _T_h_e _H_a_c_k_e_r'_s _D_i_c_t_i_o_n_a_r_y.  New York: Harper
  4124.                     and Row, 1988.
  4125.  
  4126.           [Stei88]  Stein, Jennifer G., Clifford  Neuman,  and  Jeffrey  L.
  4127.                     Schiller.   ``Kerberos:  An  Authentication Service for
  4128.                     Open Network Systems.''  _U_S_E_N_I_X _C_o_n_f_e_r_e_n_c_e _P_r_o_c_e_e_d_i_n_g_s,
  4129.                     Dallas, Texas, Winter 1988, pp. 203-211.
  4130.  
  4131.           [Stol88]  Stoll, Clifford.  ``Stalking the Wily  Hacker.''   _C_o_m_-
  4132.                     _m_u_n_i_c_a_t_i_o_n_s _o_f _t_h_e _A_C_M, 31 (5): 484-497, May 1988.
  4133.  
  4134.           [Stol89]  Stoll, Clifford.  _T_h_e _C_u_c_k_o_o'_s _E_g_g.  New York:  Double-
  4135.                     day, 1989.
  4136.  
  4137.           [Sun88a]  Sun Microsystems.  _S_u_n_O_S _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, Part  Number
  4138.                     800-1751-10, May 1988.
  4139.  
  4140.           [Sun88b]  Sun Microsystems.  _S_y_s_t_e_m _a_n_d  _N_e_t_w_o_r_k  _A_d_m_i_n_i_s_t_r_a_t_i_o_n,
  4141.  
  4142.  
  4143.  
  4144.                                          60
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.                     Part Number 800-1733-10, May 1988.
  4156.  
  4157.           [Sun88c]  Sun Microsystems.  _S_e_c_u_r_i_t_y _F_e_a_t_u_r_e_s _G_u_i_d_e, Part Number
  4158.                     800-1735-10, May 1988.
  4159.  
  4160.           [Sun88d]  Sun Microsystems.  ``Network  File  System:  Version  2
  4161.                     Protocol  Specification.''   _N_e_t_w_o_r_k  _P_r_o_g_r_a_m_m_i_n_g, Part
  4162.                     Number 800-1779-10, May 1988, pp. 165-185.
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.                                          61
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.                                          62
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.                            APPENDIX A - SECURITY CHECKLIST
  4288.  
  4289.  
  4290.  
  4291.                This checklist summarizes the information presented in  this
  4292.           paper, and can be used to verify that you have implemented every-
  4293.           thing described.
  4294.  
  4295.  
  4296.  
  4297.           _A_c_c_o_u_n_t _S_e_c_u_r_i_t_y
  4298.                []  Password policy developed and distributed to all users
  4299.                []  All passwords checked against obvious choices
  4300.                []  Expiration dates on all accounts
  4301.                []  No ``idle'' guest accounts
  4302.                []  All accounts have passwords or ``*'' in the password field
  4303.                []  No group accounts
  4304.                []  ``+'' lines in _p_a_s_s_w_d and _g_r_o_u_p checked if running Yellow Pages
  4305.  
  4306.           _N_e_t_w_o_r_k _S_e_c_u_r_i_t_y
  4307.                []  _h_o_s_t_s._e_q_u_i_v contains only local hosts, and no ``+''
  4308.                []  No ._r_h_o_s_t_s files in users' home directories
  4309.                []  Only local hosts in ``root'' ._r_h_o_s_t_s file, if any
  4310.                []  Only ``console'' labeled as ``secure'' in _t_t_y_t_a_b (servers only)
  4311.                []  No terminals labeled as ``secure'' in _t_t_y_t_a_b (clients only)
  4312.                []  No NFS file systems exported to the world
  4313.                []  _f_t_p_d version later than December, 1988
  4314.                []  No ``decode'' alias in the aliases file
  4315.                []  No ``wizard'' password in _s_e_n_d_m_a_i_l._c_f
  4316.                []  No ``debug'' command in _s_e_n_d_m_a_i_l
  4317.                []  _f_i_n_g_e_r_d version later than November 5, 1988
  4318. The Whole Boston Restaurant List
  4319. ********************************
  4320.  
  4321. (As of Sep 9, 1994)
  4322.  
  4323.  o Introduction
  4324.  o Boston Restaurants listed by Area
  4325.  o Boston Restaurants organized by Cuisine
  4326.  o Boston Beer and Cider
  4327.  o Recommended Boston Sunday Brunch Buffets
  4328.  o Other Boston Lists
  4329.  o Restaurants Outside Boston
  4330.  o Changes Since Last Month
  4331.  
  4332. ======================================================================
  4333. Introduction
  4334. ======================================================================
  4335.  
  4336. This is a list of recommended restaurants in the Boston area with a
  4337. focus primarily on flavor, quality & value, though the list reports on
  4338. things like service & ambience as well.
  4339.  
  4340. The emphasis is on moderately-priced restaurants which serve interesting
  4341.